Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp775031pxb; Tue, 12 Apr 2022 13:07:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyK+OkvNLJT+rrEk2HztgHd4VNMVxlnVXrr5pN70ph0FedoZlgJk5RQ65juemV9wicfg9zi X-Received: by 2002:a17:902:7447:b0:158:2662:b8e2 with SMTP id e7-20020a170902744700b001582662b8e2mr21950615plt.54.1649794053755; Tue, 12 Apr 2022 13:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649794053; cv=none; d=google.com; s=arc-20160816; b=waxBssWw4aPs+zF8YAIbhWEnWRl9TTBO4z89gkZVq4UFiXTt3cWdBZmOEGfDOJJwJh swT8V4GJPe662D2owGr0rOjPHyulV0+ZUrAnugt8CkYqU11ndVYGPcddXh/0YuwWYOgl gU9QjNVxWtXVdycAD+PrIbxJeQHeWzrwrog00IuSQjP94+9IhIpnnx2NbyPPD4ieC5rv ovD0fIjfZ0HoToXxfqNtfXJ2nlM4kZd8GWCO3Fy/Tbm6FFG+bSrcrIFWbgkJWhENoLT7 +qrC6IHk6lysVxWwi2xFAoR4X0+eJqRPCtAD7X+a55r+PfcdIoIZN90wtYIvp1BHYLY4 SRbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7js1UH2M/H4XFdT/VYX4By9FNV4HBtwbQGAItNp0olE=; b=bfU9lgLcz4TbV3c/DSFPtmUjKr7Zjge4GLeTqaHn+OjGXYnaLfQjQyKGT8ajdyuTQd C3vRdiSSXsoxEz3seZBS2MCFFIc7XnNJbdUQYUktWSiICeW5tRsNsTYUW1dkxSOOWSi7 PXvEfuzaVX9xl1NWPm+rXfL8LwNqaUBHAPOpKYMRQ9R20n8QkDkUmY6fj39RQqBSNw7T jk1OU7Yk5I2d4DBkjM2LDGWXwFts83e02wMRhubrKBmI3Qw8uRHdlT/eMDcfTEqytrcW vqD2QfOlni67z1RXWqpBlGJbgQGXxz0vsJA27CLik4Gxf/gJN024crUf8KVtJX8tdwgk HNzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z2uChZtZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y8-20020a655b48000000b0039834489e06si3728665pgr.428.2022.04.12.13.07.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z2uChZtZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BCBB75B3E5; Tue, 12 Apr 2022 12:56:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354113AbiDLPDb (ORCPT + 99 others); Tue, 12 Apr 2022 11:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbiDLPD2 (ORCPT ); Tue, 12 Apr 2022 11:03:28 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9830250451 for ; Tue, 12 Apr 2022 08:01:08 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id o20-20020a05600c511400b0038ebbbb2ad8so1818518wms.0 for ; Tue, 12 Apr 2022 08:01:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=7js1UH2M/H4XFdT/VYX4By9FNV4HBtwbQGAItNp0olE=; b=Z2uChZtZEb6EjRK0LBefZZB3/73zZjLJyUy8NLxgtpVI8sZBEOsYczIsK4qz/vKXJ7 aIVS5OagmaNmz88LDX3kaGrIHNEFQIzGWFrXQGANXHDw4f+tpS1ZaMQODYuPNa4ydUvY 9sJgUVa+aiKi1IJRtNeUo/6XnEXk8MbKk4UBCqlppIa6VCzsUJ1whX2kDlya7CKYbWSJ gLEMs2t5ZjVtEYCNI4r192x3vgHR4I0f+LaLnjL37RV6SsqR2ubRQfQvhRoeoD+gSqYA AjZflTeIBr/wXKUKDnQGKNo4p57EA/cb2Wo55A7mbjr7WDk2yhtAlX/gKPqiMd8Kdela RDUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=7js1UH2M/H4XFdT/VYX4By9FNV4HBtwbQGAItNp0olE=; b=g7Xl0QApgqaqrj8FpF046F5UM2G1pudynF75v/5rHdGo5WdXsLtK0MT4FnnKPYJaGA u0zkHrdavgvPplyVItxMX/ZQGOmTSUUOhThXP9hHCql4pQe8pt78exzMSNYzTNVpz//I q79oPm9/4YmBsBa3cLiJQKcJ9fMwXxYeOD4LXuJ2M28Gx6WmkM4Y50ZBpjA/oVsibgkf A16BxcqXeUxzjTKFCtUKX9ZvbO4FECj6ucgjnM2MJ6rtEAzEDic6/6K6/5yLh8sd25nN 03RulT/wF21LdRndFQulE16+vKjShBEl/+dt2hue77DfxMx5+Dn5FDsBb55+l68iQgQN pfcQ== X-Gm-Message-State: AOAM531dltQztnTdSFhdfYBntiVjZzgbD/pTvNk0fNJ01ywe1SW79la+ edslty+29jRfZMW5tS//kYjbsg== X-Received: by 2002:a1c:44c5:0:b0:38e:abd1:d894 with SMTP id r188-20020a1c44c5000000b0038eabd1d894mr4561539wma.40.1649775667018; Tue, 12 Apr 2022 08:01:07 -0700 (PDT) Received: from [192.168.86.34] (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.googlemail.com with ESMTPSA id n23-20020a05600c3b9700b0038b7c4c0803sm3026900wms.30.2022.04.12.08.01.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Apr 2022 08:01:06 -0700 (PDT) Message-ID: <149e3140-1b9d-b864-c14c-4d2cb098ec9a@linaro.org> Date: Tue, 12 Apr 2022 16:01:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] slimbus: qcom: fix error check return value of platform_get_irq() Content-Language: en-US To: cgel.zte@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org Cc: gregkh@linuxfoundation.org, sdharia@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Lv Ruyi , Zeal Robot References: <20220412090259.2533316-1-lv.ruyi@zte.com.cn> From: Srinivas Kandagatla In-Reply-To: <20220412090259.2533316-1-lv.ruyi@zte.com.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 12/04/2022 10:02, cgel.zte@gmail.com wrote: > From: Lv Ruyi > > platform_get_irq() return negative value on failure, so null check of > ctrl->irq is incorrect. Fix it by comparing whether it is less than zero. > > Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver") > Reported-by: Zeal Robot > Signed-off-by: Lv Ruyi There was already a patch posted to fix this https://git.kernel.org/pub/scm/linux/kernel/git/srini/slimbus.git/commit/?h=for-next&id=54bf672111eef18819fa6e562f68b2d6c449b05d --srini > --- > drivers/slimbus/qcom-ctrl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c > index f04b961b96cd..b2f01e155d77 100644 > --- a/drivers/slimbus/qcom-ctrl.c > +++ b/drivers/slimbus/qcom-ctrl.c > @@ -510,7 +510,7 @@ static int qcom_slim_probe(struct platform_device *pdev) > } > > ctrl->irq = platform_get_irq(pdev, 0); > - if (!ctrl->irq) { > + if (ctrl->irq < 0) { > dev_err(&pdev->dev, "no slimbus IRQ\n"); > return -ENODEV; > }