Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5544272rwb; Wed, 9 Aug 2023 06:00:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSKtix8l6bsFa8lnBvbS9q3wQjqrdebiR/hruyjsVJNY/lGyvXUa3TMXEhdIQAjtUuDadc X-Received: by 2002:a05:6a21:338c:b0:13d:1b66:9e16 with SMTP id yy12-20020a056a21338c00b0013d1b669e16mr18661179pzb.10.1691586001260; Wed, 09 Aug 2023 06:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691586001; cv=none; d=google.com; s=arc-20160816; b=QA4P7aBggGircocPWn9YSj9CDdUtHa68GvxGFWpdu3FU/rOBPZNPhUX6eLOpjs6pcY y9o7oI5ElTYKQp8uaYeVEeDi7t195HYOeyOdEQoBQ9mJ5OZr8VYhc8Sa/ySN6tqFq07T 0f4KjXFDG92sk8kIez4kyLJcW/IRoDy8zs9i9zb9o5U+UkwQSZsfC7vS0Lldl3ePuzns sm/pmSIZgUcWPACOAwayavyONfoXOhZRs05+lPU+3CmggppWhSzFZ2dDHIPkjFWZFJKg EYW6aZ9dhtFsc4fV+2ABaO2xYjKHMcD4NidMDxGDaCYfzlOw/rwNO1gPyKe5LouqsTVV jL9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zrCQCNTr7PmrFVQwXDBalv2S/rUXoounsLWJzHy5nZs=; fh=ZvI+FVnJCzGEx7AT1adD7qOg+sixLQ7mf0IPHhEV/yg=; b=aFKhCO10rasNBO4aTQ7W5QoczdCuqh3R0YNTBM5ZZMlKTNEqRJMl6JdPmwzB8pN1iI 53bg5Z5tcarNAXXHMWLV/Gdo3W/anFloe78Yjd7EhdO6Tsktt+DRPQObE8S9UwvZx7K7 h52s630TvvrJoIFRrHcQLBlCLTmjclYzSnYmCDGqjnSlUEiaLxgqUFPPOaM0+vnG2hVH VeKSjdalGehQjjxMZ3bvcBWMGMUtfCZ9SrAx9Cwg03LTJv0Fzw1VVVfqfPneUHzY0HAJ MJFtJPUczZ0Q7sL1PbBigVElb3iWPoERiIe/3OPAoCYe9uSxg1O4lpgapMwobDF7pUZw +m2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MoHKr8BU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a65670c000000b005641dfc74d0si9138077pgf.601.2023.08.09.05.59.47; Wed, 09 Aug 2023 06:00:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MoHKr8BU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234009AbjHILe3 (ORCPT + 99 others); Wed, 9 Aug 2023 07:34:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234008AbjHILe2 (ORCPT ); Wed, 9 Aug 2023 07:34:28 -0400 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25EFE1BFE for ; Wed, 9 Aug 2023 04:34:28 -0700 (PDT) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-585fd99ed8bso11502197b3.1 for ; Wed, 09 Aug 2023 04:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691580867; x=1692185667; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zrCQCNTr7PmrFVQwXDBalv2S/rUXoounsLWJzHy5nZs=; b=MoHKr8BUDiCxVsI9iHGBgaZxbG8dCYCsEslVfJbIA3n1/7siRMzKno5Cc1zHSeSzad 2ol9dYCh7bJj7YmpSthOWoqueqNbPgP/i146CnufGBj93bFfvCPNDVbxFVE04ga63NLD LlqGl68OCDz+JHbHYoAbRUPPemYYanf7+/XpgmMh0Ems9vkm1HG/3mV3LTL86iPcOski Bzo2z4PFJanjigjp9TPiDZetakq6wUCW7FS8AjmA9CuekSDfsJpUxqdQqtame9mFwA1m VFK/bJV5GhMP29twYqsdsuOPGWsTQYsvOKvnbjW/Go0+Jo8XqxNwIfPoc3KBIUb+VBhI EMRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691580867; x=1692185667; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zrCQCNTr7PmrFVQwXDBalv2S/rUXoounsLWJzHy5nZs=; b=RUISD6KBVGJBLQYjFLSArfzLMOKHh/NyfoYn/QTuY4On/XkqdA49roGQpO9SVVm7y6 W4lrIbpkZFV6bLOyDEqxVLYC0JXb1pxowJFoVIfzO6TEbv5I532QJHDt1kOuyJCZ/LDS hTtRBe+i6SfUIMaff0KlqTcxv/ySYxqLX33dcywnlJPQ7mC8PLNeDEbaZ9zXEz5xHKEB SvT5EpXpQCBl1opXqCkXJCDHkUsSQUZRJ4u1CRb3bicmXfXt+Nl+Q7zOWc4jYU3QzHsw tj2BIy2XzuFoptJq4EhZfDnpRFunapM8hKmHQliY3Dp3w35gwtpqsGRTharx6hGZSKDn QrXA== X-Gm-Message-State: AOJu0Yyy8sDLipyFScc2sVKMTjUPCQK8ri5tinRHbRGPjA2pu4duToAN 7SvCv4nFQAFXfQ4y5jWDR5KVnsUmWIGZqnId6oA/uA== X-Received: by 2002:a81:6c4f:0:b0:583:4f67:d5bd with SMTP id h76-20020a816c4f000000b005834f67d5bdmr2020845ywc.20.1691580867398; Wed, 09 Aug 2023 04:34:27 -0700 (PDT) MIME-Version: 1.0 References: <20230809071812.547229-1-harshit.m.mogalapalli@oracle.com> <20230809071812.547229-2-harshit.m.mogalapalli@oracle.com> In-Reply-To: <20230809071812.547229-2-harshit.m.mogalapalli@oracle.com> From: Ulf Hansson Date: Wed, 9 Aug 2023 13:33:51 +0200 Message-ID: Subject: Re: [PATCH next v2 2/2] mmc: sunplus: Fix platform_get_irq() error checking To: Harshit Mogalapalli Cc: tonyhuang.sunplus@gmail.com, lhjeff911@gmail.com, dan.carpenter@linaro.org, arnd@arndb.de, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, error27@gmail.com, kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Aug 2023 at 09:19, Harshit Mogalapalli wrote: > > The platform_get_irq() function returns negative error codes on failure. > > Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021") > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/all/a3829ed3-d827-4b9d-827e-9cc24a3ec3bc@moroto.mountain/ > Signed-off-by: Harshit Mogalapalli Applied for fixes and by adding a stable tag, thanks! Kind regards Uffe > --- > v1->v2: Split into two patches as they are doing different things. > > This is based on static analysis with smatch, only compile tested. > --- > drivers/mmc/host/sunplus-mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sunplus-mmc.c b/drivers/mmc/host/sunplus-mmc.c > index 2bdebeb1f8e4..e9cb1a57cb75 100644 > --- a/drivers/mmc/host/sunplus-mmc.c > +++ b/drivers/mmc/host/sunplus-mmc.c > @@ -885,7 +885,7 @@ static int spmmc_drv_probe(struct platform_device *pdev) > return dev_err_probe(&pdev->dev, PTR_ERR(host->rstc), "rst get fail\n"); > > host->irq = platform_get_irq(pdev, 0); > - if (host->irq <= 0) > + if (host->irq < 0) > return host->irq; > > ret = devm_request_threaded_irq(&pdev->dev, host->irq, > -- > 2.39.3 >