lkml.org 
[lkml]   [2008]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    Subjectmedia/radio/radio-si470x.c: check-after-use
    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.

    cu
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed



    \
     
     \ /
      Last update: 2008-01-28 23:21    [W:0.035 / U:0.504 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site