提交 1d6ca29d 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[media] mantis: cleanup NULL checking in mantis_ca_exit()

Smatch complainst that the call to mantis_evmgr_exit() dereferences "ca"
but then we check it for NULL on the next line.  I've moved the NULL
check forward to avoid that.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 081416e6
......@@ -198,11 +198,12 @@ void mantis_ca_exit(struct mantis_pci *mantis)
struct mantis_ca *ca = mantis->mantis_ca;
dprintk(MANTIS_DEBUG, 1, "Mantis CA exit");
if (!ca)
return;
mantis_evmgr_exit(ca);
dprintk(MANTIS_ERROR, 1, "Unregistering EN50221 device");
if (ca)
dvb_ca_en50221_release(&ca->en50221);
dvb_ca_en50221_release(&ca->en50221);
kfree(ca);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册