Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp659590pxb; Tue, 5 Apr 2022 17:40:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMcdyqmQSw4qUcjXfjxihBVLaMb6nDcB6DHmp1JUc9fZ6Ov48nMhuGYGMayw1MyZaSQbjz X-Received: by 2002:a17:906:c104:b0:6e4:a223:1af9 with SMTP id do4-20020a170906c10400b006e4a2231af9mr5695871ejc.441.1649205643204; Tue, 05 Apr 2022 17:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649205643; cv=none; d=google.com; s=arc-20160816; b=rFx6HBGX2BrlF+X23PnVpt5rPIURqOqLJZ88n0ObUMY9sOx/bczF0SmvOmhGEkUXah SMoNuJbqu77iib8ns4XVvWicqXoH6kFP4wD3wC8GEx8WpGZnV1J51S2XjNKRQoloNE1Z raPva2NdePdtN+QmfsmQyEaqSiUlApr0MV9VH4Ko77NTNxeB7572hZu3Sso64kq3HcN8 Zy9HTaU/09Wz6rezSbFSlYCZBiV9dXs9p0KRURAp1Nn5NctVMZkqTQC1t1egzlahVNXB 6gx9hPIy8E+vD/DqvlXU4OJOxVYRCtF5avPTgK4UaWiqi6tMsSr87zkAVlo5/2N34HhN MHiw== 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=jsed01HA/XuPOLiN+ddA06xO1aFFkuFBxJr6pxJO5Ps=; b=MSxqobZoja730XuQFF6KuHwgr9tt/eWgDSx/D3zvj4U75jij4QeusYejeX9F5XmUsU mRxNeE6oWsaFYEJhpkdZpy8GDTXrh9gzX4L3YhC5H1fdhVuXHbhYkESkb6JXliJaXL7J 5O6mAwRUZu+eZRSKAjfWx3ecA/4lFLknOzXUaQM+6xyJ9jEiKHH/viEP6D0KALxIQvs/ MPHO0z8VNjFZK7UTC2glQ5e1zEpec/urTjb7kZgvwCXxzCJX8bKw+hB8AL+YuMG8XSH6 zJL/e6TilkEoqH6pJ9U20ZL9lAaIAU82lZJCwbeZrk0KdH/LoafMajOoHtWeFDwlXEi6 YZ2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WU8vSjhx; 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 y26-20020a1709063a9a00b006df7acaf40esi10076474ejd.645.2022.04.05.17.40.17; Tue, 05 Apr 2022 17:40:43 -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=WU8vSjhx; 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 S1351418AbiDELyV (ORCPT + 99 others); Tue, 5 Apr 2022 07:54:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244896AbiDEIwp (ORCPT ); Tue, 5 Apr 2022 04:52:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6C5F2458A; Tue, 5 Apr 2022 01:45:50 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5028FB81BAE; Tue, 5 Apr 2022 08:45:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96818C385A0; Tue, 5 Apr 2022 08:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148348; bh=HWxjACHl9Ir8KVcVfW8mCP3H8HhaV08T+cFUkUDcZTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WU8vSjhxfwUfKs9jwEym2vAk9tTId714y+au48/IY7aOnPNeRHE6IxhN8XDXNRcEa HfLo0AcGokHdzlkdEDK5+XbNSn4HNLRiAFhSOTMwdxDeI1CP/uT2rOHd0bn3u7ett7 EGf/lYRA2f8kt5hLkW9t3kM8cpnuEr0psNWjMRT8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Nishanth Menon , Dave Gerlach , Sasha Levin Subject: [PATCH 5.16 0324/1017] soc: ti: wkup_m3_ipc: Fix IRQ check in wkup_m3_ipc_probe Date: Tue, 5 Apr 2022 09:20:37 +0200 Message-Id: <20220405070403.897260482@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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.1 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 [ Upstream commit c3d66a164c726cc3b072232d3b6d87575d194084 ] platform_get_irq() returns negative error number instead 0 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: cdd5de500b2c ("soc: ti: Add wkup_m3_ipc driver") Signed-off-by: Miaoqian Lin Signed-off-by: Nishanth Menon Acked-by: Dave Gerlach Link: https://lore.kernel.org/r/20220114062840.16620-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/soc/ti/wkup_m3_ipc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c index 72386bd393fe..2f03ced0f411 100644 --- a/drivers/soc/ti/wkup_m3_ipc.c +++ b/drivers/soc/ti/wkup_m3_ipc.c @@ -450,9 +450,9 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev) return PTR_ERR(m3_ipc->ipc_mem_base); irq = platform_get_irq(pdev, 0); - if (!irq) { + if (irq < 0) { dev_err(&pdev->dev, "no irq resource\n"); - return -ENXIO; + return irq; } ret = devm_request_irq(dev, irq, wkup_m3_txev_handler, -- 2.34.1