[mtd-next] mtd: spi-nor: remove redundant check on err

Submitted by Colin King on June 29, 2017, 5:50 p.m.


Message ID 20170629175054.12231-1-colin.king@canonical.com
State New
Delegated to: Cyrille Pitchen
Headers show

Commit Message

Colin King June 29, 2017, 5:50 p.m.
From: Colin Ian King <colin.king@canonical.com>

The variable err is not updated since the previous check on it, so
the subsequent check on err is redundant and can be removed.

Detected by CoverityScan, CID#1448658 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
 drivers/mtd/spi-nor/spi-nor.c | 3 ---
 1 file changed, 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 196b52f083ae..1296c1931591 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2307,9 +2307,6 @@  static int spi_nor_parse_sfdp(struct spi_nor *nor,
-		if (err)
-			goto exit;