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

Commit 86f4e5d4 authored by Ionut Nicu's avatar Ionut Nicu Committed by Kumar Gala
Browse files

[POWERPC] QE: Make qe_get_firmware_info reentrant



The function was returning NULL the second time it was
called if the firmware was uploaded from the boot loader
or the first time it was called if the firmware was
uploaded from the kernel.

Signed-off-by: default avatarIonut Nicu <ionut.nicu@freescale.com>
Acked-By: default avatarTimur Tabi <timur@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent ad562c71
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -609,7 +609,10 @@ struct qe_firmware_info *qe_get_firmware_info(void)
	 * If we haven't checked yet, and a driver hasn't uploaded a firmware
	 * If we haven't checked yet, and a driver hasn't uploaded a firmware
	 * yet, then check the device tree for information.
	 * yet, then check the device tree for information.
	 */
	 */
	if (initialized || qe_firmware_uploaded)
	if (qe_firmware_uploaded)
		return &qe_firmware_info;

	if (initialized)
		return NULL;
		return NULL;


	initialized = 1;
	initialized = 1;