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>
This commit is contained in:
Jesper Juhl 2012-04-09 22:51:48 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель a6c8ef9526
Коммит c5714b5acf
1 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -230,10 +230,7 @@ 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);
LEAVE();