Skip to content

Commit

Permalink
[media] staging: as102: Remove redundant NULL check before release_fi…
Browse files Browse the repository at this point in the history
…rmware() 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: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
jjuhl authored and Mauro Carvalho Chehab committed Apr 19, 2012
1 parent 0a3475e commit b803cc5
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 b803cc5

Please sign in to comment.