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

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
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment