From: Johannes Berg Date: Wed, 18 Aug 2010 15:15:18 +0000 (+0200) Subject: firmware_class: fix typo in error path X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f45f3c1f3f616ca1d1e1eb5e7a720ca63cb59550;p=openwrt%2Fstaging%2Fblogic.git firmware_class: fix typo in error path In the error path, _request_firmware sets firmware_p to NULL rather than *firmware_p, which leads to passing a freed firmware struct to drivers when the firmware file cannot be found. Fix this. Broken by commit f8a4bd3456b988fc73b2c. Reported-by: Wey-Yi Guy Signed-off-by: Johannes Berg Acked-by: Dmitry Torokhov Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index c8a44f5e0584..40af43ebd92d 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -568,7 +568,7 @@ static int _request_firmware(const struct firmware **firmware_p, out: if (retval) { release_firmware(firmware); - firmware_p = NULL; + *firmware_p = NULL; } return retval;