From patchwork Thu Jun 29 17:50:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 782391 X-Patchwork-Delegate: cyrille.pitchen@atmel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wz6fc1S6vz9rxl for ; Fri, 30 Jun 2017 03:51:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R8U46X2B"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XfpCgVvgjFH3cifWA9Nx3+3SCliKxPIpK5CC0ppaJG4=; b=R8U46X2BYaLkqT /sKCibVdPe6oYK1xQb9bGULO/H35EvQLW3ABfayWmjuwuHji+8r8DnpevoyQ9bs6qHbcCgKbrCQDw By+80txc3VPooT3P5YQunZmBVmDVeA3T4lA4HFbn/+NUG89HARTbIkxQxjBlCIq4Eptf0FBselgZ3 8TLfqZRWY+geW47hZMSm7ekU8Vkhro3wewRwOHq8q8/o0uVhpiNJbGeiA70gldMTGVkMd73nQ98Qi RKVaVYltCcfWSmaLZNo7EBlX5m4FG+Cm6CXF+Rk7saOxWLQktrf1IohGAe4y8rE9iyf2F1BhoI3FU DzlsMHqGm7HPCNff0TDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQdbF-0002wf-4h; Thu, 29 Jun 2017 17:51:29 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQdbC-0002t7-7U for linux-mtd@lists.infradead.org; Thu, 29 Jun 2017 17:51:27 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1dQdag-0008N5-PB; Thu, 29 Jun 2017 17:50:54 +0000 From: Colin King To: Cyrille Pitchen , Marek Vasut , David Woodhouse , Brian Norris , Boris Brezillon , Richard Weinberger , linux-mtd@lists.infradead.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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170629_105126_447813_2A60CE56 X-CRM114-Status: UNSURE ( 8.10 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [91.189.89.112 listed in list.dnswl.org] -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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: