lkml.org 
[lkml]   [2012]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 03/26] [media] s2255drv: Remove redundant NULL test before release_firmware()
    release_firmware() tests for NULL pointers on its own - there's no
    reason to do an explicit check before calling the function.

    Signed-off-by: Jesper Juhl <jj@chaosbits.net>
    ---
    drivers/media/video/s2255drv.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
    index 4894cbb..37845de 100644
    --- a/drivers/media/video/s2255drv.c
    +++ b/drivers/media/video/s2255drv.c
    @@ -1826,8 +1826,7 @@ static void s2255_destroy(struct s2255_dev *dev)
    usb_free_urb(dev->fw_data->fw_urb);
    dev->fw_data->fw_urb = NULL;
    }
    - if (dev->fw_data->fw)
    - release_firmware(dev->fw_data->fw);
    + release_firmware(dev->fw_data->fw);
    kfree(dev->fw_data->pfw_data);
    kfree(dev->fw_data);
    /* reset the DSP so firmware can be reloaded next time */
    --
    1.7.10

    --
    Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
    Don't top-post http://www.catb.org/jargon/html/T/top-post.html
    Plain text mails only, please.



    \
     
     \ /
      Last update: 2012-04-09 22:53    [W:0.018 / U:38.536 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site