diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-05-24 15:11:45 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-06-09 18:07:30 +0300 |
commit | 7cc471112edd5292a05698dd3f7b9543844a26a1 (patch) | |
tree | f1acd1340f13c2401ce88d71882f77f57646423e | |
parent | 254f3337ce2575bf94f1fb40cc40fdbc70371116 (diff) | |
download | linux-7cc471112edd5292a05698dd3f7b9543844a26a1.tar.xz |
media: usb: as102: drop as102_dev NULL check
Fixes this smatch warning:
drivers/media/usb/as102/as102_usb_drv.c:306 as102_usb_release() warn: can 'as102_dev' even be NULL?
And indeed, as102_dev can never be NULL, so just drop the NULL check.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r-- | drivers/media/usb/as102/as102_usb_drv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/usb/as102/as102_usb_drv.c b/drivers/media/usb/as102/as102_usb_drv.c index 50419e8ae56c..6b380144d6c2 100644 --- a/drivers/media/usb/as102/as102_usb_drv.c +++ b/drivers/media/usb/as102/as102_usb_drv.c @@ -303,10 +303,8 @@ static void as102_usb_release(struct kref *kref) struct as102_dev_t *as102_dev; as102_dev = container_of(kref, struct as102_dev_t, kref); - if (as102_dev != NULL) { - usb_put_dev(as102_dev->bus_adap.usb_dev); - kfree(as102_dev); - } + usb_put_dev(as102_dev->bus_adap.usb_dev); + kfree(as102_dev); } static void as102_usb_disconnect(struct usb_interface *intf) |