projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'work-fixes'
[powerpc.git]
/
drivers
/
mtd
/
devices
/
m25p80.c
diff --git
a/drivers/mtd/devices/m25p80.c
b/drivers/mtd/devices/m25p80.c
index
45108ed
..
d5f2408
100644
(file)
--- a/
drivers/mtd/devices/m25p80.c
+++ b/
drivers/mtd/devices/m25p80.c
@@
-378,7
+378,9
@@
static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
spi_sync(flash->spi, &m);
- *retlen += m.actual_length - sizeof(flash->command);
+ if (retlen)
+ *retlen += m.actual_length
+ - sizeof(flash->command);
}
}