提交 a1408379 编写于 作者: M Markus Elfring 提交者: Mauro Carvalho Chehab

[media] staging: bcm2048: Delete an unnecessary check before the function call...

[media] staging: bcm2048: Delete an unnecessary check before the function call "video_unregister_device"

The video_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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 47e604c5
无相关合并请求
...@@ -2684,9 +2684,7 @@ static int __exit bcm2048_i2c_driver_remove(struct i2c_client *client) ...@@ -2684,9 +2684,7 @@ static int __exit bcm2048_i2c_driver_remove(struct i2c_client *client)
vd = bdev->videodev; vd = bdev->videodev;
bcm2048_sysfs_unregister_properties(bdev, ARRAY_SIZE(attrs)); bcm2048_sysfs_unregister_properties(bdev, ARRAY_SIZE(attrs));
video_unregister_device(vd);
if (vd)
video_unregister_device(vd);
if (bdev->power_state) if (bdev->power_state)
bcm2048_set_power_state(bdev, BCM2048_POWER_OFF); bcm2048_set_power_state(bdev, BCM2048_POWER_OFF);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部