aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-24 18:32:30 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-25 13:44:34 -0200
commit6b281d830f09a4f58651839030b39571dea1b56d (patch)
tree978d84a55ea2358ce6efaf5161a8229302453946 /drivers/media/common
parent1cc6adfef42615478e9af1228377acbc9f54f00f (diff)
[media] siano: unnecessary check before rc_unregister_device()
The rc_unregister_device() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/siano/smsir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/common/siano/smsir.c b/drivers/media/common/siano/smsir.c
index 273043ea8f47..35d0e887bd65 100644
--- a/drivers/media/common/siano/smsir.c
+++ b/drivers/media/common/siano/smsir.c
@@ -107,8 +107,7 @@ int sms_ir_init(struct smscore_device_t *coredev)
void sms_ir_exit(struct smscore_device_t *coredev)
{
- if (coredev->ir.dev)
- rc_unregister_device(coredev->ir.dev);
+ rc_unregister_device(coredev->ir.dev);
sms_log("");
}

Privacy Policy