mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
[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: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
47e604c5dd
commit
a1408379ba
@ -2684,9 +2684,7 @@ static int __exit bcm2048_i2c_driver_remove(struct i2c_client *client)
|
||||
vd = bdev->videodev;
|
||||
|
||||
bcm2048_sysfs_unregister_properties(bdev, ARRAY_SIZE(attrs));
|
||||
|
||||
if (vd)
|
||||
video_unregister_device(vd);
|
||||
video_unregister_device(vd);
|
||||
|
||||
if (bdev->power_state)
|
||||
bcm2048_set_power_state(bdev, BCM2048_POWER_OFF);
|
||||
|
Loading…
Reference in New Issue
Block a user