2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 07:04:00 +08:00
linux-next/drivers/media
Tobias Lorenz c3f686f152 V4L/DVB (7108): radio-si470x.c: check-after-use
Adrian used the coverity checker against radio-si470x and found this:

> The Coverity checker spotted the following check-after-use in
> drivers/media/radio/radio-si470x.c:
>
> <--  snip  -->
> static void si470x_usb_driver_disconnect(struct usb_interface *intf)
> {
>         struct si470x_device *radio = usb_get_intfdata(intf);
>
>         del_timer_sync(&radio->timer);    <------------------
>         flush_scheduled_work();
>
>         usb_set_intfdata(intf, NULL);
>         if (radio) {                      <------------------
>                 video_unregister_device(radio->videodev);
>                 kfree(radio->buffer);
>                 kfree(radio);
>         }
> }
> <--  snip  -->
>
> Either "radio" can be NULL and this case has to be properly handled or
> the NULL check is not required.

These two lines should indeed better be inside the if statement.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:09 -03:00
..
common V4L/DVB (7133): Fix Kconfig dependencies 2008-02-18 11:14:53 -03:00
dvb V4L/DVB (7100): frontends/tda18271-common.c: fix off-by-one 2008-02-18 11:15:02 -03:00
radio V4L/DVB (7108): radio-si470x.c: check-after-use 2008-02-18 11:15:09 -03:00
video V4L/DVB (7106): em28xx/: make 2 functions static 2008-02-18 11:15:09 -03:00
Kconfig V4L/DVB (7133): Fix Kconfig dependencies 2008-02-18 11:14:53 -03:00
Makefile V4L/DVB (6814): Makefile: always enter video/ 2007-12-13 17:58:05 -02:00