Skip to content

Commit

Permalink
[media] s2255drv: Remove redundant NULL test before release_firmware()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jesper Juhl authored and Mauro Carvalho Chehab committed Apr 19, 2012
1 parent b803cc5 commit 3fc82fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/video/s2255drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 3fc82fa

Please sign in to comment.