[media] staging: as102: Remove redundant NULL check before release_firmware() 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 <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Jesper Juhl 2012-04-09 16:51:48 -03:00 committed by Mauro Carvalho Chehab
parent 0a3475eb61
commit b803cc58c3
1 changed files with 1 additions and 4 deletions

View File

@ -230,11 +230,8 @@ int as102_fw_upload(struct as10x_bus_adapter_t *bus_adap)
pr_info("%s: firmware: %s loaded with success\n", pr_info("%s: firmware: %s loaded with success\n",
DRIVER_NAME, fw2); DRIVER_NAME, fw2);
error: error:
/* free data buffer */
kfree(cmd_buf); kfree(cmd_buf);
/* release firmware if needed */ release_firmware(firmware);
if (firmware != NULL)
release_firmware(firmware);
LEAVE(); LEAVE();
return errno; return errno;