Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp590732iog; Mon, 13 Jun 2022 08:43:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFfzF38FRSE8wclDR/bduA2dUG/HwSbWov5R457O8gwjdJKWRoJDPsXnfNWkOoOsDtopgp X-Received: by 2002:a17:907:7da5:b0:711:c9cd:61e0 with SMTP id oz37-20020a1709077da500b00711c9cd61e0mr388142ejc.443.1655135021312; Mon, 13 Jun 2022 08:43:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655135021; cv=none; d=google.com; s=arc-20160816; b=sJ4fzdt20YeeZNVi5WjU2AEv0TLWOGN/f/83GU2SmeptGXpsEsiQvburpQHhYtQgYq ArKzn8HDW264Y9bHDhAAgDOx1Nju/b2ybpyudQzfgPPene84Tfzv710eLWm94Nvyf0iv bWZDoT2Hqt+arQhDxB17CHFG9mP9q0OJ4q4Dk0pcVYgilXxjPE1mB9kmcdfTqkMtSwgr VWfqH85oFoaFPfHU28PtOiaGrKc5mixkh7jXzWBTm7cb4kfPkNpx4ohD7TlHuzOPJ9bt Ip6PnAwcPr6TsbBoKyWzHKl/1qSp8e8kzkM4ruKb9heHjLEKfPBAyoYQX88reUOuqvCg ZOAw== 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=EAFRXjvU1IEua/51Qq7EoA4l/sz5BCSJvjMfP5SY1s4=; b=xyMdxkvBYgMaArtWqpVJ8u1Qs5p5n1pYF1RM6ii7pOk6RaEAQTwAc8iH2O+e46jMDW e/rMTq6XfR+dGLozFIUXWInAvtyIcDSziosb2kuKZDG0I3yDrTpq+G0YE53TUlTFMduG nZvX0+mmmkVq9PEEydFyOorRsCaZLIBObrGJeP7qxVSH3+LnR1vTpWUSV6Hk2h2zSiq+ 6+5A7x5/UiaUsCifBvBfYQUPkHfCcnKUPJbr8wrE/9p2GBPltgeoTrgKen4UCRVOIgVJ Y9TPf28UYMJCBch4nuBnspbFX+IMLrOmzq3V43H1VZ0vLZJdaziqb4Uiu8RPi9GlRtGH J1Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s8Utj2Yy; 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 r9-20020aa7d589000000b0042dd47aecd0si7495379edq.444.2022.06.13.08.43.16; Mon, 13 Jun 2022 08:43:41 -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=s8Utj2Yy; 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 S1352591AbiFMMLq (ORCPT + 99 others); Mon, 13 Jun 2022 08:11:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359307AbiFMMFi (ORCPT ); Mon, 13 Jun 2022 08:05:38 -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 BDD89275D6; Mon, 13 Jun 2022 03:59:57 -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 2B94CB80D31; Mon, 13 Jun 2022 10:59:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 802D4C3411C; Mon, 13 Jun 2022 10:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117994; bh=3asobehzkVspHT8E/j84NOnaKjD3cMkdRZEeRZqxFeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s8Utj2Yyu/N2jkmfFKXdAAvW+B+CFquHjkSI4xhgui3HPsUnCRgTVKEEfZbnslb+u EcyGtmRN2VbQuAOj+V+dZvcVc3rAf+8BNcXBwN0Gc85eZ8dygoCeTdmH2N9K9Fy9ep zeNTLxDu0YwoEiijvydiMmDAKx0MhqfxEHNfACvo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Bjorn Andersson , Sasha Levin Subject: [PATCH 4.19 197/287] rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value Date: Mon, 13 Jun 2022 12:10:21 +0200 Message-Id: <20220613094929.836529855@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094923.832156175@linuxfoundation.org> References: <20220613094923.832156175@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=-8.3 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: Krzysztof Kozlowski [ Upstream commit 1a358d35066487d228a68303d808bc4721c6b1b9 ] The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO. Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220422105326.78713-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sasha Levin --- drivers/rpmsg/qcom_smd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index aa008fa11002..6e09fccd2e87 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1388,7 +1388,7 @@ static int qcom_smd_parse_edge(struct device *dev, edge->name = node->name; irq = irq_of_parse_and_map(node, 0); - if (irq < 0) { + if (!irq) { dev_err(dev, "required smd interrupt missing\n"); ret = irq; goto put_node; -- 2.35.1