Commit 7cc47111 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 254f3337
...@@ -303,10 +303,8 @@ static void as102_usb_release(struct kref *kref) ...@@ -303,10 +303,8 @@ static void as102_usb_release(struct kref *kref)
struct as102_dev_t *as102_dev; struct as102_dev_t *as102_dev;
as102_dev = container_of(kref, struct as102_dev_t, kref); as102_dev = container_of(kref, struct as102_dev_t, kref);
if (as102_dev != NULL) { usb_put_dev(as102_dev->bus_adap.usb_dev);
usb_put_dev(as102_dev->bus_adap.usb_dev); kfree(as102_dev);
kfree(as102_dev);
}
} }
static void as102_usb_disconnect(struct usb_interface *intf) static void as102_usb_disconnect(struct usb_interface *intf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment