From: Jesper Juhl Date: Mon, 9 Apr 2012 20:51:48 +0000 (+0200) Subject: staging: as102: Remove redundant NULL check before release_firmware() and pointless... X-Git-Tag: v3.5-rc1~145^2~229^2~182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5714b5acfb0ea7816340ba37bb8631c7061448e;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/media/as102/as102_fw.c b/drivers/staging/media/as102/as102_fw.c index 43ebc43..9db275e 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;