aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/qe_lib/qe.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/qe_lib/qe.c')
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 6efbd5e5bb1b..cc81fd1141b0 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -509,7 +509,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
509 } 509 }
510 510
511 /* Validate some of the fields */ 511 /* Validate some of the fields */
512 if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) { 512 if ((firmware->count < 1) || (firmware->count > MAX_QE_RISC)) {
513 printk(KERN_ERR "qe-firmware: invalid data\n"); 513 printk(KERN_ERR "qe-firmware: invalid data\n");
514 return -EINVAL; 514 return -EINVAL;
515 } 515 }
@@ -609,7 +609,10 @@ struct qe_firmware_info *qe_get_firmware_info(void)
609 * If we haven't checked yet, and a driver hasn't uploaded a firmware 609 * If we haven't checked yet, and a driver hasn't uploaded a firmware
610 * yet, then check the device tree for information. 610 * yet, then check the device tree for information.
611 */ 611 */
612 if (initialized || qe_firmware_uploaded) 612 if (qe_firmware_uploaded)
613 return &qe_firmware_info;
614
615 if (initialized)
613 return NULL; 616 return NULL;
614 617
615 initialized = 1; 618 initialized = 1;