Skip to content

Commit

Permalink
[POWERPC] QE: Make qe_get_firmware_info reentrant
Browse files Browse the repository at this point in the history
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: Ionut Nicu <ionut.nicu@freescale.com>
Acked-By: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Ionut Nicu authored and Kumar Gala committed Mar 10, 2008
1 parent ad562c7 commit 86f4e5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/powerpc/sysdev/qe_lib/qe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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;

initialized = 1;
Expand Down

0 comments on commit 86f4e5d

Please sign in to comment.