Skip to content

Commit

Permalink
staging: as102: Remove redundant NULL check before release_firmware()…
Browse files Browse the repository at this point in the history
… and pointless comments

release_firmware() deals gracefullt with NULL pointers - it's
redundant to check for them before calling the function.

Also remove a few pointless comments - it's rather obvious from the
code that kfree() free's a buffer and that release_firmware() releases
firmware - comments just stating that add no value.

Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
jjuhl authored and gregkh committed Apr 18, 2012
1 parent a6c8ef9 commit c5714b5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/staging/media/as102/as102_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,8 @@ int as102_fw_upload(struct as10x_bus_adapter_t *bus_adap)
pr_info("%s: firmware: %s loaded with success\n",
DRIVER_NAME, fw2);
error:
/* free data buffer */
kfree(cmd_buf);
/* release firmware if needed */
if (firmware != NULL)
release_firmware(firmware);
release_firmware(firmware);

LEAVE();
return errno;
Expand Down

0 comments on commit c5714b5

Please sign in to comment.