提交 5d20bad1 编写于 作者: B Brian Norris

mtd: cfi_cmdset_0002: check return code for get_chip()

Coverity CID 1230633
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
Tested-by: NChristian Riesch <christian.riesch@omicron.at>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册