From patchwork Mon Apr 14 22:23:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 3987801 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C931D9F2CC for ; Mon, 14 Apr 2014 22:23:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 188BC20148 for ; Mon, 14 Apr 2014 22:23:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AB1D2010F for ; Mon, 14 Apr 2014 22:23:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755324AbaDNWXe (ORCPT ); Mon, 14 Apr 2014 18:23:34 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:54398 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754682AbaDNWXc (ORCPT ); Mon, 14 Apr 2014 18:23:32 -0400 Received: by mail-ie0-f174.google.com with SMTP id rp18so8484704iec.5 for ; Mon, 14 Apr 2014 15:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=10ECJHVziLHDz5cIiwtKxqJJ/fHaQa+p1U7+8LIrkGo=; b=hLoV3HlbiHkMseNap70ctqYtF35LowieFWciQm6x5DqUfJid1KpoBoQHNyg/MbhTVD F/GlgLdxFmtoNyj8C7RaC2iFhCqCJwS/g7jzr7fWzZgOgI012I2hG9WErCIFCVEpyVAM 5wndhT699oihlI28O8wqRoDq8WK+qETtpMCQ2Ul5lFc4itwt/Y5XAC3wrca46Zrq23vY p8uQQxP5jQU8JDgBSqm/VsmOuX2AScEdFxqI/b4tZnjDLV0BjRfxOyhzs76CfjvCUw3C Ex7J9PdxCKYAkI7HKadLzA2cVqr6D1eaG/4tAgmdbC1fenzYAPAPkCGg0j2TRaul4IuZ r22Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=10ECJHVziLHDz5cIiwtKxqJJ/fHaQa+p1U7+8LIrkGo=; b=cN5sN7FjsA7wL3pfIyArB5ipsDCfkDWyNd7wLSkLGfapnaUWN81HPcNwGyGxLUknNV nl9ckwdFaTIiEMendiIxdGk3Wfs4C2OI/w5cG8R09bt1lNAuEJ2U13akY+tI3IMqYj2j BmUQUXB81dCQ+71H2tPu9RfiFfk8x99XzEhvsz8pTYpElx5zYGNLMPktVkvm8a0RD6kB RvWQtS7+dA48qgSesbeBhCJO/Ea248TRVQAVSUxb0n1BVdq9iTSol3ZmmOozdZa8sWPM zAmDj5WWSLmAtx6MXcPSTSHCaKdSOjdl7elXSQoLxW0voKL/ENrk0x0i1SocF96/9eCU xLEA== X-Gm-Message-State: ALoCoQlnaI7eiUq4LNvBHOls297NJzVGv9x4+1de3X0Oxql87cDtFt7A0f4wat1DwYwljbDq37/KrXsyYusKdRvLBsGDecH9rhQQMi77buzPrXprk6GnBRXxoWn0Tly0oyJ9QQWwGWI8os7UoaP4wOecAIkNToy9nxg5ll2oIqcK8uzSwx+GT8oglZOoM36xratFQqHTNdthgZg8Xs1r6KJVSkKXL4KFBA== X-Received: by 10.50.49.8 with SMTP id q8mr18680275ign.47.1397514212161; Mon, 14 Apr 2014 15:23:32 -0700 (PDT) Received: from localhost ([172.16.50.138]) by mx.google.com with ESMTPSA id r4sm32741953igh.1.2014.04.14.15.23.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 15:23:31 -0700 (PDT) Subject: [PATCH] mmc: sdhci-pci: Remove useless check for "slots == 0" To: Ulf Hansson , Chris Ball From: Bjorn Helgaas Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 14 Apr 2014 16:23:30 -0600 Message-ID: <20140414222330.14817.81724.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the check for "slots == 0" because it can never be 0 here. Found by Coverity (CID 744269). Signed-off-by: Bjorn Helgaas --- drivers/mmc/host/sdhci-pci.c | 2 -- 1 file changed, 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index fdc612120362..15edb3f56dae 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -1491,8 +1491,6 @@ static int sdhci_pci_probe(struct pci_dev *pdev, slots = PCI_SLOT_INFO_SLOTS(slots) + 1; dev_dbg(&pdev->dev, "found %d slot(s)\n", slots); - if (slots == 0) - return -ENODEV; BUG_ON(slots > MAX_SLOTS);