projects
/
fw
/
openocd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06b4903
)
NOR/SPEARSMI: fix segfault
author
Antonio Borneo
<borneo.antonio@gmail.com>
Thu, 18 Nov 2010 07:01:03 +0000
(15:01 +0800)
committer
Øyvind Harboe
<oyvind.harboe@zylin.com>
Tue, 23 Nov 2010 07:37:28 +0000
(08:37 +0100)
If flash chip is not listed in the table, or if no flash is
connected, pointer must be properly initialized.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
src/flash/nor/spearsmi.c
patch
|
blob
|
history
diff --git
a/src/flash/nor/spearsmi.c
b/src/flash/nor/spearsmi.c
index c3bc2ec585008f7b3dbdecaeed8d9925743dffd5..5e6a2c472ad2e8d9684a8f4b69e142548cfde7c3 100644
(file)
--- a/
src/flash/nor/spearsmi.c
+++ b/
src/flash/nor/spearsmi.c
@@
-647,6
+647,7
@@
static int spearsmi_probe(struct flash_bank *bank)
if (retval != ERROR_OK)
return retval;
+ spearsmi_info->dev = NULL;
for (struct flash_device *p = flash_devices; p->name ; p++)
if (p->device_id == id) {
spearsmi_info->dev = p;