summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/qe_lib/qe.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-03-14 19:29:18 +0000
committerSteve French <sfrench@us.ibm.com>2008-03-14 19:29:18 +0000
commitebe8912be214662c8289977fb416c1f015df4a0b (patch)
treecb82c552c602e5ae1a4bd8c11bd171bf88a58c35 /arch/powerpc/sysdev/qe_lib/qe.c
parent50531444fac593c8c8e3ff2e41944d9507bb4665 (diff)
parentdba92d3bc49c036056a48661d2d8fefe4c78375a (diff)
downloadop-kernel-dev-ebe8912be214662c8289977fb416c1f015df4a0b.zip
op-kernel-dev-ebe8912be214662c8289977fb416c1f015df4a0b.tar.gz
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
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 6efbd5e..cc81fd1 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)
}
/* Validate some of the fields */
- if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) {
+ if ((firmware->count < 1) || (firmware->count > MAX_QE_RISC)) {
printk(KERN_ERR "qe-firmware: invalid data\n");
return -EINVAL;
}
@@ -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;
OpenPOWER on IntegriCloud