Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp441857iog; Mon, 13 Jun 2022 06:05:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh1oUdUHh6F9vBqZYl9xCDWv/T3+4yZPMYx3jiBQQl0ZPmBAw1yWKgpp6REVyDIq0S7OAs X-Received: by 2002:a17:902:690a:b0:168:def8:f964 with SMTP id j10-20020a170902690a00b00168def8f964mr4989968plk.61.1655125525800; Mon, 13 Jun 2022 06:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125525; cv=none; d=google.com; s=arc-20160816; b=DR5MoIsRpokJAhVmQN6WfrxlmGlVnN38l7e9/qUE9GJSioANUrsTMeI2G+5SJkiNgD UFlpgTKo4Z29s7R/YZER8UP49KSHRihICia2FYrVlJ7y4qK+OiQZ3ZPV15Jyius19Y1R kykDtgTMVoogzuV8OmEEbIh3tW3lnBE+0aPGwSXbt356sllZ30XGT0GJvl0q+lPaBWJx XsEiY3+ywkyF0gdCDsA+Dva3vGk3Ic56LwAXYNiEEBBUErErLm3BfT3e40B6VWzNN/Z4 hSC43983lNoh/cwiQW5HwJeW8gYjDpwpmf3+jtN1iS8n+03G0TmXKAZQ6R8uulN6REK0 sMWw== 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=nl9Ix2AvcklFmzpRBIayjLz/Lbd0IqVCvedgjlf59ys=; b=WCQ3SOPPJwsUSHnoFdsSVL8Fc93bxufgB/7vUr73bE/eh/ZDyt8qA6ovYgvJ6lqcmZ G6SJ10I12fxiTVVKTa05mw+0DsfwXu7OMNoS1r7iv+c4rQOaH4GbOS4VjQLsc25Z4LbS siKE9zgQzjYuRbdAil9+oGLwYqR6tuI6cFlD3aeuMX/R/aVgnJT64HVbz4NN0qc4Q90i prpNU14k1UlO5DFigzsMfBM7WJnO1LRywAKxF0q17FXECFNROWAKx5SsiZWWQ+ljul82 2UvJX3S/A+v4HykKreEAAPv3VN5JPLcIkrNF/78seWKXxX3VcDvOvpR5kR2YpQi1zTwL 061w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p1qjERb1; 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 s6-20020a63d046000000b003fe4da82aa6si9176696pgi.744.2022.06.13.06.05.06; Mon, 13 Jun 2022 06:05:25 -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=p1qjERb1; 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 S1350766AbiFMLBw (ORCPT + 99 others); Mon, 13 Jun 2022 07:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350253AbiFMKyr (ORCPT ); Mon, 13 Jun 2022 06:54:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 430EBE083; Mon, 13 Jun 2022 03:30:38 -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 D2D4160F09; Mon, 13 Jun 2022 10:30:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DADC7C3411E; Mon, 13 Jun 2022 10:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116237; bh=CiyIxF9z8z9QYDdkG6uLCYmnjaaZlUfD4+unSqkBlD4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p1qjERb1yVtgzrxG+5vrfWjbqldXWT+FNaYANAj8hJA2qbAXSRFFU2W320SOtC5xN JrGaHnYH0OnZ57yDYj3rdnXYuRClA7zrrrTW1nZDcXdDjyIS/fD1vU00mdbESE0NjC 481d6pcmHY5irH9pHc1rtjv3B0l/TEbUCRXWr7vM= 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.14 147/218] rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value Date: Mon, 13 Jun 2022 12:10:05 +0200 Message-Id: <20220613094925.049253088@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@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 72d02bfeda9e..781df7a17b56 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1299,7 +1299,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"); return -EINVAL; } -- 2.35.1