Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d20bad1 authored by Brian Norris's avatar Brian Norris
Browse files

mtd: cfi_cmdset_0002: check return code for get_chip()



Coverity CID 1230633

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Tested-by: default avatarChristian Riesch <christian.riesch@omicron.at>
parent 2a500afe
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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,