From patchwork Mon Mar 9 17:18:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 448135 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B9CB9140146 for ; Tue, 10 Mar 2015 04:20:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=nuFQElq/; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YV1KN-00028p-9z; Mon, 09 Mar 2015 17:18:51 +0000 Received: from mail-pd0-x22f.google.com ([2607:f8b0:400e:c02::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YV1KJ-0001xv-N8 for linux-mtd@lists.infradead.org; Mon, 09 Mar 2015 17:18:48 +0000 Received: by pdbfp1 with SMTP id fp1so45319315pdb.2 for ; Mon, 09 Mar 2015 10:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=GmFWukqOEekiZydMxKvcJ+/zQEt1AouS53w/I5ueo30=; b=nuFQElq/4hs4m8/SM2i81cSebHwu/mKMHd6NPC6ZZuKWUan1aOi6fj5o711iKdhbbU +wuhk5XwHgnKlXpxJpkfJ8WMQNWlksb0A043P/HTnTdWC6Up5y/a3P2xTq2pBGvcPjWD OchONh8Hw5nmkesEY7w0bdzgIOhkeR7mns4la7hQXRKjaILkl87y9TS/GOM/ZUL8n974 Ww8u5oG17w0lrhxFdi45/1jOU6ySoz+i8ADIPqDGLRxi/je7OZ+tfVM+Nz1ngFlYROd4 BrZh7Wf9YuqtNoqAJISKvdRKqw3CX3qLD/VdemK7BFqgJs0RXOC1iGyq1dM8LWL9R8Yn oROw== X-Received: by 10.70.38.136 with SMTP id g8mr55984315pdk.80.1425921504198; Mon, 09 Mar 2015 10:18:24 -0700 (PDT) Received: from ld-irv-0074 (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id v7sm2512457pds.72.2015.03.09.10.18.21 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Mar 2015 10:18:23 -0700 (PDT) Date: Mon, 9 Mar 2015 10:18:16 -0700 From: Brian Norris To: linux-mtd@lists.infradead.org Subject: [PATCH v2 1/7] mtd: docg3: drop dead code Message-ID: <20150309171816.GR18140@ld-irv-0074> References: <1425117750-22298-1-git-send-email-computersforpeace@gmail.com> <1425117750-22298-2-git-send-email-computersforpeace@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1425117750-22298-2-git-send-email-computersforpeace@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150309_101847_815015_76F7B88B X-CRM114-Status: GOOD ( 11.32 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c02:0:0:0:22f listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (computersforpeace[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Cc: Joe Perches , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org If no devices were found, we would already have skipped over this code. Detected by Coverity, CID #744270 Signed-off-by: Brian Norris Acked-by: Robert Jarzmik --- v2: kill 'found' entirely drivers/mtd/devices/docg3.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c index 448ce42f951e..0310f9174dcc 100644 --- a/drivers/mtd/devices/docg3.c +++ b/drivers/mtd/devices/docg3.c @@ -2033,7 +2033,7 @@ static int __init docg3_probe(struct platform_device *pdev) struct mtd_info *mtd; struct resource *ress; void __iomem *base; - int ret, floor, found = 0; + int ret, floor; struct docg3_cascade *cascade; ret = -ENXIO; @@ -2073,14 +2073,11 @@ static int __init docg3_probe(struct platform_device *pdev) 0); if (ret) goto err_probe; - found++; } ret = doc_register_sysfs(pdev, cascade); if (ret) goto err_probe; - if (!found) - goto notfound; platform_set_drvdata(pdev, cascade); doc_dbg_register(cascade->floors[0]->priv);