Commit b803cc58 authored by Jesper Juhl's avatar Jesper Juhl Committed by Mauro Carvalho Chehab

[media] staging: as102: Remove redundant NULL check before release_firmware()...

[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: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0a3475eb
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment