mtd: spi-nor: use IS_ERR_OR_NULL as spi_nor_read_id returns ERR_PTR
Subsystems (2)
PATCH 1/1 mtd: spi-nor: use IS_ERR_OR_NULL as spi_nor_read_id returns ERR_PTR
Signed-off-by Rafał Miłecki <[email protected]>
---
Oh damn, I did wrong in my commit 5986a0d4717bc82af0e69e3c6dd04150eafceabe
mtd: spi-nor: allow NULL as chip name and try to auto detect it
Glad we have Dan & kbuild watching us.
--- drivers/mtd/spi-nor/spi-nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi-nor/spi-nor.c +1 -1
@@ -943,7 +943,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) id =spi_nor_read_id (nor); else id =spi_nor_match_id (name); -if (!id) +if (IS_ERR_OR_NULL (id))return -ENOENT ; info = (void *)id->driver_data;
Signature · 1 line
1.8.4.5
Quoted 7 lines · Rafał Miłecki
Signed-off-by Rafał Miłecki <[email protected]>---
Oh damn, I did wrong in my commit5986a0d4717bc82af0e69e3c6dd04150eafceabe
mtd: spi-nor: allow NULL as chip name and try to auto detect itGlad we have Dan & kbuild watching us.
Squashed into the bad commit and pushed to l2-mtd.git. Thanks!