Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752883AbdF2Rv1 (ORCPT ); Thu, 29 Jun 2017 13:51:27 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:41024 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752343AbdF2RvV (ORCPT ); Thu, 29 Jun 2017 13:51:21 -0400 From: Colin King To: Cyrille Pitchen , Marek Vasut , David Woodhouse , Brian Norris , Boris Brezillon , Richard Weinberger , linux-mtd@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][mtd-next] mtd: spi-nor: remove redundant check on err Date: Thu, 29 Jun 2017 18:50:54 +0100 Message-Id: <20170629175054.12231-1-colin.king@canonical.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 715 Lines: 28 From: Colin Ian King 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 --- drivers/mtd/spi-nor/spi-nor.c | 3 --- 1 file changed, 3 deletions(-) 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, default: break; } - - if (err) - goto exit; } exit: -- 2.11.0