Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3560307iob; Tue, 17 May 2022 02:42:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1Qp4mqermjLH6JwPR3Y47L0zC+4PGqPq6NgSMKHZLonUoM0fmxdC07eyyMdkl4Ey6rdnY X-Received: by 2002:a05:6a00:1991:b0:50e:697:53f9 with SMTP id d17-20020a056a00199100b0050e069753f9mr21823261pfl.22.1652780548680; Tue, 17 May 2022 02:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652780548; cv=none; d=google.com; s=arc-20160816; b=wmxCtqfRx2wS/bEhFtZSHcgbFlKvth9B+BJHWtSH/oVwl0q5uoZM5iq9/stZXcpnHA 5fsn422VuAaJObDEdN+QaHUbchgCpNKYAuP20M2drPsan9kIZ+Ykrpfi+kEvmhmImbUF p7iQzswz7hTtzf4TnMHjOevha9xTOpaXhsn4CJYHOFtsSA5UJyW6dUbbNib9/issTbiF 82fpZxoXhV65/N9tczjv36xno9BcONizcbb2AIQCjk/3SZgm31Ju9CSVVG47exTAkO1j 4U9lJgkwLh7DA0NnSKylQ1mgckrHBrMM4+GKW9Qgpmg6kfT8NZq4wNMvvjlwrWBjeDkY LlPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uuqmXYXP67gaLt/+xMUwDoy8sxPLUTMIkCw0Hsl7Myk=; b=p4LKkHxsMCo3s8Zrc4sFP+WS20w8tH8HeZIAwCDvguP3XeiynOW5AcIKHf/FbXAn7a hN96ZfTQFpMNySu8gBUrqRrk+amCVrmqdiWv90jo9pON/22bNKbiIVvei6Cd5bg5ISSj MHST82X4FxYn4mTNQIy316oaVmuyamCxwREEd4OjpkMwu6DWpOBpjUApDEq3c3DxXlFr J8v035kx/xKYX6o9Y+pnCB9Uds3I40MTsGqii9VJJguBH+Mt7JRzEPa0LRQDEyRpa6Ku RRIT9jMd7b38oZeH1lhgJVSvUJGrZJyu+DtpHQrWCjQZRwEPTJYIRHUu2dZZ8ChlL8gA TPJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X+qGp6Mm; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t5-20020a056a0021c500b0050d3f057ea9si16506938pfj.235.2022.05.17.02.42.17; Tue, 17 May 2022 02:42:28 -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=@linuxfoundation.org header.s=korg header.b=X+qGp6Mm; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347130AbiEPTvp (ORCPT + 99 others); Mon, 16 May 2022 15:51:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346949AbiEPTqz (ORCPT ); Mon, 16 May 2022 15:46:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CBA3427D1; Mon, 16 May 2022 12:44:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0DAAF6155B; Mon, 16 May 2022 19:44:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1DF9C385AA; Mon, 16 May 2022 19:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652730255; bh=Dd5bm4NtHHEFcaFf5w6xNS60nrturXKLQxOMwNfw/2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X+qGp6MmETdWa2TmtZ9edm8tE7ak3Wqbxn4oV3lSS/wWnWQGQnb6AF6H63y1C5c3f iRjx6QQ6BUtOqIuaB6P6nnXtAUBaFW1adBUDxl7Bujs2/2HwhLyH6faKp8pqAXm7Lj pHJ8mqZCXta433nR6+Gd608Q+CHdC2D/ZVQkaCUI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Srinivas Kandagatla Subject: [PATCH 5.4 32/43] slimbus: qcom: Fix IRQ check in qcom_slim_probe Date: Mon, 16 May 2022 21:36:43 +0200 Message-Id: <20220516193615.666836040@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220516193614.714657361@linuxfoundation.org> References: <20220516193614.714657361@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Miaoqian Lin commit fe503887eed6ea528e144ec8dacfa1d47aa701ac upstream. platform_get_irq() returns non-zero IRQ number on success, negative error number on failure. And the doc of platform_get_irq() provides a usage example: int irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; Fix the check of return value to catch errors correctly. Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver") Cc: stable@vger.kernel.org Signed-off-by: Miaoqian Lin Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220429164917.5202-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/slimbus/qcom-ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -515,9 +515,9 @@ static int qcom_slim_probe(struct platfo } ctrl->irq = platform_get_irq(pdev, 0); - if (!ctrl->irq) { + if (ctrl->irq < 0) { dev_err(&pdev->dev, "no slimbus IRQ\n"); - return -ENODEV; + return ctrl->irq; } sctrl = &ctrl->ctrl;