summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-06 12:12:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-06 12:12:09 -0700
commit925e0ea47cacc285286550dd48ff4b51cdd911ef (patch)
treed66f34b74cb1c7ee84d0209a5e9de2283cbd266a /drivers
parent86ba8b0aee711b01fa5a14868035a3f4d6b1e1d9 (diff)
parentb25046b1e5e3f1423434da77ccc859f2f779d1ce (diff)
downloadlinux-925e0ea47cacc285286550dd48ff4b51cdd911ef.tar.gz
linux-925e0ea47cacc285286550dd48ff4b51cdd911ef.tar.bz2
linux-925e0ea47cacc285286550dd48ff4b51cdd911ef.zip
Merge tag 'for-linus-20140905' of git://git.infradead.org/linux-mtd
Pull mtd fixes from Brian Norris: "Two trivial MTD updates for 3.17-rc4: - a tiny comment tweak, to kill a bunch of DocBook warnings added during the merge window - a small fixup to the OTP routines' error handling" * tag 'for-linus-20140905' of git://git.infradead.org/linux-mtd: mtd: nand: fix DocBook warnings on nand_sdr_timings doc mtd: cfi_cmdset_0002: check return code for get_chip()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 5a4bfe33112a..46c4643b7a07 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1434,6 +1434,10 @@ static int cfi_amdstd_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,
mutex_lock(&chip->mutex);
ret = get_chip(map, chip, base, FL_LOCKING);
+ if (ret) {
+ mutex_unlock(&chip->mutex);
+ return ret;
+ }
/* Enter lock register command */
cfi_send_gen_cmd(0xAA, cfi->addr_unlock1,