Browse Source

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()
Linus Torvalds 11 years ago
parent
commit
925e0ea47c
2 changed files with 5 additions and 1 deletions
  1. 4 0
      drivers/mtd/chips/cfi_cmdset_0002.c
  2. 1 1
      include/linux/mtd/nand.h

+ 4 - 0
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);
 				mutex_lock(&chip->mutex);
 				ret = get_chip(map, chip, base, FL_LOCKING);
 				ret = get_chip(map, chip, base, FL_LOCKING);
+				if (ret) {
+					mutex_unlock(&chip->mutex);
+					return ret;
+				}
 
 
 				/* Enter lock register command */
 				/* Enter lock register command */
 				cfi_send_gen_cmd(0xAA, cfi->addr_unlock1,
 				cfi_send_gen_cmd(0xAA, cfi->addr_unlock1,

+ 1 - 1
include/linux/mtd/nand.h

@@ -949,7 +949,7 @@ static inline int jedec_feature(struct nand_chip *chip)
 		: 0;
 		: 0;
 }
 }
 
 
-/**
+/*
  * struct nand_sdr_timings - SDR NAND chip timings
  * struct nand_sdr_timings - SDR NAND chip timings
  *
  *
  * This struct defines the timing requirements of a SDR NAND chip.
  * This struct defines the timing requirements of a SDR NAND chip.