firmware_class: fix typo in error path
PATCH 1/1 firmware_class: fix typo in error path
From: Johannes Berg <[email protected]>
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.
--- drivers/base/firmware_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/firmware_class.c +1 -1
@@ -568,7 +568,7 @@ static int _request_firmware(const struc out:if (retval) {release_firmware (firmware); - firmware_p =NULL ; + *firmware_p =NULL ; }return retval;
Quoted 9 lines · Johannes Berg
From: Johannes Berg <[email protected]>
In the error path,
_request_firmwaresetsfirmware_pto 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.
Nice catch, thanks. I'll queue it up.
greg k-h
Quoted 9 lines · Greg KH
Quoted 8 lines · Johannes Berg
From: Johannes Berg <[email protected]>
In the error path,
_request_firmwaresetsfirmware_pto NULL rather than*firmware_p, which leads to passing a freed firmware struct to drivers when the firmware file cannot be found. Fix this.
Quoted 4 lines
Quoted 1 line
Broken by commit
f8a4bd3456b988fc73b2c.Nice catch, thanks. I'll queue it up.
Yep, looks good, thank you for fixing this,
Signature · 1 line
Dmitry