Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp444080iog; Mon, 13 Jun 2022 06:07:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAJQAr0KurRl21xQW29rgZl/uIoRT46OIRzmWMt9kEzUTFT5SYj4hBzkFrBURph48JMjDl X-Received: by 2002:a17:907:d90:b0:711:d151:51aa with SMTP id go16-20020a1709070d9000b00711d15151aamr36781607ejc.452.1655125635064; Mon, 13 Jun 2022 06:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125635; cv=none; d=google.com; s=arc-20160816; b=05i0RiYDZKcZwfFVn9FQlbGbcXOwSRe09KsO6hsAQ6k6duO3HmcpRLrAMouwegVtdt fVUZXFZUKKUKBxkXQdYJh1ZPGgM8l1yaAWIxh0n18DmHrVsbDDhpUDKXr5YF+zBKWE2B +BIJE0YEXM8yvK8g4i2qeFm0+3ZiyLFshhDRWPypTItBHm8+g0vzw4kuQTKYHckNMS9E Tq7wmewloSPIyqgDrS7I0Sp7c3f63eeXHogCKz2ht+eBB5jKeOOhuw1AiPMj/4FhMr15 hum3LuM90AoQCpSV4OlGZJ4qCtfa1JkOH6h4Z3BIrB/IzyQTeJkbHk1PQUbqMwJdGhkL iAjQ== 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=nObY2d6r69wVSi11MzvL+arLhUXVvW7k1+Y1uu37F1A=; b=be6dglJsGp/RHvy3ErFkNMBz6GflkAdYwhztV7LQdM2E0zEFGlIreDR1gmpswBi6+B KxCXweJj9JA9r8hQHkJm9Kc+lUTwaDcw/NX8zJJVHZnYo/kBcM2zQQ6XKUQNB7RQYZIP DNmle3WTyAGzLxk1v2d5vs+e/U/xt97bPX/Tfs2kFNqsMZJkLGUOsI0Md6hOHoE3qBDJ GBuNYykoaBW0ZMbkXvWKGk0Cxueapbr7UDuhBc9cQWw3HJYN+L6chOGcbn5OzpSXf0MK b3AVAWfEwXk7qq3vPd94z8a7HAxEE/xLMiw5ersz6NOROn1aSRlQ3G7nLUFiljMQkE6E Eyqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y1JIOZ2q; 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 gb21-20020a170907961500b006e7f255f245si9074539ejc.36.2022.06.13.06.06.44; Mon, 13 Jun 2022 06:07:15 -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=y1JIOZ2q; 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 S1354941AbiFMLge (ORCPT + 99 others); Mon, 13 Jun 2022 07:36:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354548AbiFML3m (ORCPT ); Mon, 13 Jun 2022 07:29:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08278205F4; Mon, 13 Jun 2022 03:45:03 -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 0423B6124B; Mon, 13 Jun 2022 10:45:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D899C34114; Mon, 13 Jun 2022 10:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117102; bh=mXb3EGnlfsQbZ7x/ORnIuJun0U/yrAkEu/I6uQIYaIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y1JIOZ2q0+zJfKRhBCO5fvyrz1FoCU/dxN8wMuhGY9TA9BiE8vBdUDBdpNiy/Vk0Q GtQpmOjocB2m0HFfwKrQioa3D6X3y5xddXodln/jp2nnEwOPe9u8JYV9NUCe+4oJjx PnkjLHSuyzv38uosXkDeFS+SvYIO1Jiv3ClmybiM= 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 5.4 299/411] rpmsg: qcom_smd: Fix returning 0 if irq_of_parse_and_map() fails Date: Mon, 13 Jun 2022 12:09:32 +0200 Message-Id: <20220613094937.724227353@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@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 59d6f72f6f9c92fec8757d9e29527da828e9281f ] irq_of_parse_and_map() returns 0 on failure, so this should not be passed further as error return code. Fixes: 1a358d350664 ("rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220423093932.32136-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 db5f6009fb49..a4db9f6100d2 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1390,7 +1390,7 @@ static int qcom_smd_parse_edge(struct device *dev, irq = irq_of_parse_and_map(node, 0); if (!irq) { dev_err(dev, "required smd interrupt missing\n"); - ret = irq; + ret = -EINVAL; goto put_node; } -- 2.35.1