Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp202600iob; Mon, 2 May 2022 17:06:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE/LZyOOOYZbUu87yIhqzCsbTpLU/B9GjHDOwSvLnELY1a1QxJQKaCUpfU3b9IVnhGzwxr X-Received: by 2002:a63:dd54:0:b0:3a8:f358:5b3f with SMTP id g20-20020a63dd54000000b003a8f3585b3fmr11742217pgj.97.1651536361144; Mon, 02 May 2022 17:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651536361; cv=none; d=google.com; s=arc-20160816; b=t5d0l1wdYA+QkwAxX0qdjKPY8+xQTofB/NnmLkZIB+NPhNld+D99Dd2XoOmpkD6jdW uFQDsEgfSaS++ARMu6zlr+pZZstnmm0cYNk0js3QhhuDDodfLH9YG0/hemy1ZVp6k591 ipLInZsFdGT+d1YIe0t3NgJs0SqKt7KI31YAXReVQoVVpYXwfqWpj3+JPXIdALJ0wZEn iwOZeSsMzujCGUZm3bJzkW5AXH8OTeggA5QvQ0ydfFdpEoQ6geI6ccnLCfdDnbIFBekU rWDYvaPdkEU75PbFNKElrZJsWKjt6THR7+KaK5ATtutPlMKouZamOTDENVcJxwUWaSit wiSQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hR+ipPq2gap4bXepi4EzWC/gfjexmZUBGu30czl6wWU=; b=CUGNrULOx88pnGj1rVdaoCfl23u/bhUq7kJ+0QfJ9DTxuwX3Lny7iBN5F30/vlor92 mocASG0dbN4jyUMieZdj8uVQO/qWd9RhD7YB9K8UNnUtHn1XfaJmioYOxnKpSw/xcBL0 5wWVpkQOBcElHn9Np7xgodAIVDbsVIdRoF5JMEWWEBx6Jlvy/gsm7fq6G0L4iBlW7+39 jZPnMp2RvUOI+oLPCMYGT9WkDshN+0APCZXHZT+ICycBehhI9QXW37Larru+DMDSHUCz t6PFhTNG9pM5qIdsBXNcfhbil1rIRJZ7TdfBk8Ned76gHQu7hVV7u55ANHfcqsPNdHp7 jg1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vaItMW+1; 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 m1-20020a170902bb8100b00153b2d164aasi14601788pls.178.2022.05.02.17.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:06:01 -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=vaItMW+1; 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 846962316E; Mon, 2 May 2022 17:05:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379307AbiD2Qxx (ORCPT + 99 others); Fri, 29 Apr 2022 12:53:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379301AbiD2Qxn (ORCPT ); Fri, 29 Apr 2022 12:53:43 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EF5E101FE for ; Fri, 29 Apr 2022 09:50:24 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id t6so11551054wra.4 for ; Fri, 29 Apr 2022 09:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hR+ipPq2gap4bXepi4EzWC/gfjexmZUBGu30czl6wWU=; b=vaItMW+1gyLuD6nhgipRjoSdUBqBq1APnbecLpaCBuq9hU/b9Ir0ZoimHT8smyU7qh wGrNrckEtlos5Fp6ugNuUsP0qrUwso3UoN5DODnpxSoylbN//uXifD8PThUirbJvmNKB 8Lxmn0pX3jb98je+cnJozRPkTvr19ia4C1N3CWcEiSHjPp6RcuOhpILSetKfW3krfT+b s8BddRpIT6rWEIfSPhWjN9o9BRIIhIOm46mn37L31KBCqajlJlwRpjuifNwEIeVaL8/e LMuhj/RHTMN3o3FmRI95pVr44xspL4GO3cq7q/XrXQWB6hzpFBOSaRkb12striwDmzMP 2I/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hR+ipPq2gap4bXepi4EzWC/gfjexmZUBGu30czl6wWU=; b=uSz1/93X/g6E2ECcJLaoU/R7pqhAAfHANYffKKC+LFDimwTf4HHx8AY5trsoJrhwrH NIKxFZt7wcowVG0jGVFTFunzMG2eUixDWYVdaTmRYYrqm9rHR9kcf5NGpiCTu2M3F6uU X+csRVhX3aiQK0eV+h3FM9tgSvCo3gexQVeJn2svfj448nB/4p+lJIvmNmEsqz9VN0qy QNihaMJ6bhMB0qK0Qk6AZvJ9m/Kd4wrVbO01iWj0yA6FXTY+AHuQqIdnblvZYgx+gYtZ aKxdb95vc/mDK9CZNRZ+0hOy0Ivl9VPZrLF62hfLsRifEMdtOAns0X/65na2Mg5z1A5D PeJg== X-Gm-Message-State: AOAM530guTtqWkjPbR8PpgngmktTDJYASbRPFL4zvbIVPuuRCEKQrdDX E1qJhuAs6PIk2iG/bDZYbaml+g== X-Received: by 2002:a5d:4a84:0:b0:20c:47b6:61ee with SMTP id o4-20020a5d4a84000000b0020c47b661eemr51638wrq.68.1651251022697; Fri, 29 Apr 2022 09:50:22 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id f1-20020a1c6a01000000b0038c9f6a3634sm6846906wmc.7.2022.04.29.09.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 09:50:22 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Miaoqian Lin , stable@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/1] slimbus: qcom: Fix IRQ check in qcom_slim_probe Date: Fri, 29 Apr 2022 17:49:17 +0100 Message-Id: <20220429164917.5202-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220429164917.5202-1-srinivas.kandagatla@linaro.org> References: <20220429164917.5202-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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. Cc: stable@vger.kernel.org Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver") Signed-off-by: Miaoqian Lin Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index f04b961b96cd..ec58091fc948 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -510,9 +510,9 @@ 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; + return ctrl->irq; } sctrl = &ctrl->ctrl; -- 2.21.0