diff options
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0002.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 4 |
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, | |||
1434 | 1434 | ||
1435 | mutex_lock(&chip->mutex); | 1435 | mutex_lock(&chip->mutex); |
1436 | ret = get_chip(map, chip, base, FL_LOCKING); | 1436 | ret = get_chip(map, chip, base, FL_LOCKING); |
1437 | if (ret) { | ||
1438 | mutex_unlock(&chip->mutex); | ||
1439 | return ret; | ||
1440 | } | ||
1437 | 1441 | ||
1438 | /* Enter lock register command */ | 1442 | /* Enter lock register command */ |
1439 | cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, | 1443 | cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, |