aboutsummaryrefslogtreecommitdiff
path: root/platforms/rhesus
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2015-05-07 16:11:24 +0930
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-13 14:01:35 +1000
commitdcb3dc8d7e26ccecba838a1debc9d7abdc396905 (patch)
tree3c99db3679039babf576858aa3aec037cd3ff7a8 /platforms/rhesus
parentcbc09f525317b02dc6490c7c4bc0928d37b8b405 (diff)
downloadskiboot-dcb3dc8d7e26ccecba838a1debc9d7abdc396905.zip
skiboot-dcb3dc8d7e26ccecba838a1debc9d7abdc396905.tar.gz
skiboot-dcb3dc8d7e26ccecba838a1debc9d7abdc396905.tar.bz2
rhesus: Fix uninitialised variable warning
platforms/rhesus/rhesus.c:126:6: error: variable 'pnor_chip' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (rc) { ^~ platforms/rhesus/rhesus.c:141:6: note: uninitialized use occurs here if (pnor_chip) ^~~~~~~~~ platforms/rhesus/rhesus.c:126:2: note: remove the 'if' if its condition is always false if (rc) { ^~~~~~~~~ platforms/rhesus/rhesus.c:121:30: note: initialize the variable 'pnor_chip' to silence this warning struct flash_chip *pnor_chip; ^ = NULL Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms/rhesus')
-rw-r--r--platforms/rhesus/rhesus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platforms/rhesus/rhesus.c b/platforms/rhesus/rhesus.c
index 50769cf..27e1c91 100644
--- a/platforms/rhesus/rhesus.c
+++ b/platforms/rhesus/rhesus.c
@@ -118,7 +118,7 @@ static int64_t rhesus_power_down(uint64_t request __unused)
static int rhesus_pnor_init(void)
{
struct spi_flash_ctrl *pnor_ctrl;
- struct flash_chip *pnor_chip;
+ struct flash_chip *pnor_chip = NULL;
int rc;
/* Open controller, flash and ffs */