From: Jesper Juhl Date: Sat, 24 Mar 2012 22:39:18 +0000 (+0100) Subject: staging/media/as102: Don't call release_firmware() on uninitialized variable X-Git-Tag: v3.4-rc3~25^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=401c90e56c48b1c642507a8bec91b7ae21f1156e;p=pandora-kernel.git staging/media/as102: Don't call release_firmware() on uninitialized variable If, in drivers/staging/media/as102/as102_fw.c::as102_fw_upload(), the call cmd_buf = kzalloc(MAX_FW_PKT_SIZE, GFP_KERNEL); should fail and return NULL so that we jump to the 'error:' label, then we'll end up calling 'release_firmware(firmware);' with 'firmware' still uninitialized - not good. The easy fix is to just initialize 'firmware' to NULL when we declare it, since release_firmware() deals gracefully with being passed NULL pointers. Signed-off-by: Jesper Juhl Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed