Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f45f3c1f authored by Johannes Berg's avatar Johannes Berg Committed by Greg Kroah-Hartman
Browse files

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 f8a4bd34.

Reported-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8488a38f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;