diff options
author | Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> | 2015-07-03 13:52:46 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-07-07 10:34:21 +1000 |
commit | b9c9f77cfd68ebd2a23f45453ef3f64ff031d538 (patch) | |
tree | 47b8aef34f9132d2c18e4f7f185f927b15b447ec /platforms/astbmc | |
parent | 8b5386d59d3ff1ea4e961c315020d2dc60beb65f (diff) | |
download | talos-skiboot-b9c9f77cfd68ebd2a23f45453ef3f64ff031d538.tar.gz talos-skiboot-b9c9f77cfd68ebd2a23f45453ef3f64ff031d538.zip |
pnor_init() - Fix Uninitialized pointer read
In pnor_init(), there are chances of pointer bl being read before
assignment. Fix it by initializing it to NULL.
Fixes Coverity defect#97868.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms/astbmc')
-rw-r--r-- | platforms/astbmc/pnor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platforms/astbmc/pnor.c b/platforms/astbmc/pnor.c index 634cb868..2cd57c66 100644 --- a/platforms/astbmc/pnor.c +++ b/platforms/astbmc/pnor.c @@ -28,7 +28,7 @@ int pnor_init(void) { struct spi_flash_ctrl *pnor_ctrl; - struct blocklevel_device *bl; + struct blocklevel_device *bl = NULL; int rc; /* Open controller and flash. If the LPC->AHB doesn't point to |