summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-04-09 22:51:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-18 16:37:05 -0700
commitc5714b5acfb0ea7816340ba37bb8631c7061448e (patch)
tree3a5ad0c8667bed59150dd8c7a74144b7de245290 /drivers/staging/media
parenta6c8ef9526f149ce884b36841cc2e17ca890f1a4 (diff)
downloadblackbird-op-linux-c5714b5acfb0ea7816340ba37bb8631c7061448e.tar.gz
blackbird-op-linux-c5714b5acfb0ea7816340ba37bb8631c7061448e.zip
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/as102/as102_fw.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/media/as102/as102_fw.c b/drivers/staging/media/as102/as102_fw.c
index 43ebc43e6b9a..9db275e2cede 100644
--- a/drivers/staging/media/as102/as102_fw.c
+++ b/drivers/staging/media/as102/as102_fw.c
@@ -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;
OpenPOWER on IntegriCloud