Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5912986iob; Tue, 10 May 2022 06:36:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv9cybZ0/+avgAFpHTooops1MHk5J0lrw91BGUtRlhqWmMZmPPwq7Pubc/ipSDx2/qRdBm X-Received: by 2002:a65:4188:0:b0:39d:2197:13b5 with SMTP id a8-20020a654188000000b0039d219713b5mr17014593pgq.368.1652189762275; Tue, 10 May 2022 06:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652189762; cv=none; d=google.com; s=arc-20160816; b=B2JcKiBlfHONRD9+uWhrBzOFQ9dzgxZflmW0gJ2AD0Jm4aSWWaq0TGH71IQRMx9AHg gp86OMRzquTEAxAh5tGivota4GsR+3o2YAkiM4N2kuaKpphIgeZYcR6BVf/W5R4WulBd N3te64NDSXsHSAp2uqiaB/IhB2A5J17hGZIUS6LfDu2/+QJqVfti8JUZ7pItZ9hlfHo5 6SW9w/07fvwCbm+16Ipb4BGTubu97mz9f2H1cm0AH5IGA9kL518p0OcXWQvgL1DwRG8o 62H375QJ7GHXiXWKvpNKfI3oTjcz+I6srY/89H4dC4aV6C4qMnoWOuLRIIfa7ISAzUVF SV7Q== 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=ZSsn4ip/W53rYTejx2RwRo3uhHZTjv23JdLDq/v2qK78sBt9sXKcg9ZuBEmjblrvPg 3w0wDU49mlZMQjK1RauMq9Trynt/el72pY45XwNDNA0YC93udRktg28EDW5seP5m0xSE xQ1Od1MDiGIvxYg3W3ZEh8MCk79ESH+KrtIzEF++tLUK48QAfAx/c179sneD8cTcsw3V TamtIgNhhAcNlIt3Sd+0S+P8hFMja67UZGxN3xMzkPgjzOtLeU6Zg0CpAKy0CHmnnmsW HJojYu6Jj5+xxabjH84qMO2g+ATl0JVjR8nZxPzry5auDGwphZIqUPH6gwDxh7ydgFGu H+pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BeFQAi9a; 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 s7-20020a170902ea0700b0015eb4152d68si4012592plg.157.2022.05.10.06.35.46; Tue, 10 May 2022 06:36:02 -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=BeFQAi9a; 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 S239351AbiEJJ4w (ORCPT + 99 others); Tue, 10 May 2022 05:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239088AbiEJJ4r (ORCPT ); Tue, 10 May 2022 05:56:47 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA5322A1FCF for ; Tue, 10 May 2022 02:52:50 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id q23so23004213wra.1 for ; Tue, 10 May 2022 02:52:50 -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=BeFQAi9aZgk45QJ7w9Vhk3mGoIsSKbyQ4S5AFdZo5s1FX3Z7q9fG5J4UqIVmaCsBtb 9LzMPnCSCxwWOfo2lYUgOvmFROVKWYS8Uo3XLX478oURoNgyS3fOhrwqvsvYuawK0Y7l P+kD6mNlsvvBKRzdPc7WJ+SvW4+4bd8QwPpXL1rY3AGwcaCsuVGPV0pE0F1/i+LjR+Mk TGfUYClXbLCSmLIh/PA2nLoBvPH0wcXvX9wMLcYzMWfwISFrc7L8WZkVS/tKk/T/JxFZ C2YI/zvqS8YECAs331IRBH/TW35nYM/onXkSXwacy9TNkI8W7QvW09uudNKZVXYTufAM O7VQ== 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=nCGyhX2gX3KcS2iM2AusOR0OKTSNFi4faEKvwzutS9ye06JGjlQxU1TvwRRILrpAi8 SUodefBAWus4ri39gtKwNpDD0yB1BCfYRhV2qk0mW+8ICV2y+0kVzFjEKzwAUWu3CWls /RfJeoSzKAeH+w2aCjRx2soTg13RcxjBvN9n9MDuNIZH+v5bdzENtEqHPUGJuU72kKX5 Do0GsuidehBCg+iqB3/B5wybVBFWFULkVec9oMaOpRGEUMa41L9ikiK7u3LWbDsKNzrT yUOLIJSxSYa9Czt3J1GoLJnaXS3ZyWq0wGrhJgu80j/W1z+knAHqpznzPS6+ICrKpgy6 h8NQ== X-Gm-Message-State: AOAM531lSZaw0ii7rGb2hONEvyJrgR0m0T3WmSKdVsBneCrXd2Bjq0sT FrGG+cHye2Py3jdYUBICANAvUQ== X-Received: by 2002:a5d:4312:0:b0:20c:af5f:bdcf with SMTP id h18-20020a5d4312000000b0020caf5fbdcfmr14910971wrq.498.1652176369243; Tue, 10 May 2022 02:52:49 -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 j23-20020a05600c1c1700b003942a244f40sm2268252wms.25.2022.05.10.02.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 02:52:48 -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 v2 1/2] slimbus: qcom: Fix IRQ check in qcom_slim_probe Date: Tue, 10 May 2022 10:52:04 +0100 Message-Id: <20220510095205.337-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220510095205.337-1-srinivas.kandagatla@linaro.org> References: <20220510095205.337-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,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 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