summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-08-27 09:21:44 +0000
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-08-27 09:21:44 +0000
commit49ef8ef4cd120f04cd5b4f05fdf89fdfce961505 (patch)
treedb18a88869914632873359eb366ca93ddcf6fba1 /drivers/mtd
parented8f0b9dafc6dfcfccb4507a8ae71aa294b2088b (diff)
parentfd80923202c6bfd723742fc32426a7aa3632abaa (diff)
Merge tag 'v5.4.143' into 5.4-2.3.x-imx
Linux 5.4.143 Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index c8b9ab40a102..9c98ddef0097 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -119,7 +119,7 @@ static int cfi_use_status_reg(struct cfi_private *cfi)
struct cfi_pri_amdstd *extp = cfi->cmdset_priv;
u8 poll_mask = CFI_POLL_STATUS_REG | CFI_POLL_DQ;
- return extp->MinorVersion >= '5' &&
+ return extp && extp->MinorVersion >= '5' &&
(extp->SoftwareFeatures & poll_mask) == CFI_POLL_STATUS_REG;
}