Skip to content

Commit

Permalink
firmware_class: fix typo in error path
Browse files Browse the repository at this point in the history
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 f8a4bd3.

Reported-by: Wey-Yi Guy <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
jmberg-intel authored and gregkh committed Aug 24, 2010
1 parent 8488a38 commit f45f3c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f45f3c1

Please sign in to comment.