Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3034263pxj; Mon, 17 May 2021 16:05:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztAbCQr8Q5E9X7cbA2VUjGyJQPC+wsf2S/xAkG82LkbpPVx/HgAQCn42QO8WhJ7g6WeEKk X-Received: by 2002:a17:907:9612:: with SMTP id gb18mr2501998ejc.408.1621292746763; Mon, 17 May 2021 16:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621292746; cv=none; d=google.com; s=arc-20160816; b=GulQVxhLc8qtKLaeRhi9k2GGwsGFYmJYzxwM1AA++3VQBUcOFjGPhqQQv4T1FTXEY1 1rlPJu9KEeAUrqkIY57eayRQuRR4IIuFwDAJ2SaZNtDK8Wp1Y79oL4ukai0Yez93Gp34 W07ZWovhvbJRbWUe9zoYpFZ+HR3mPGMKqmsLIwM2IQCSLw66ulQkOu6imKuhw6Jiwalr /ci4CkxLr7qMi1Of2fJMmeOLlNl8Lh2NiG/Os5VAR5F0BD9U/Cmkyv6/9lOnc3ZVyKu7 X2zQbPq81fr7iEafqp6SgsU269NiqVw5yX0AnVyHfbeqsmPzKS1nFtqRr183fr+Nwzq1 22aw== 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=7Ueca0DUMZxVF5DpZAIu/LI3xX1EkTu5nowd3k3ljMU=; b=GXD8CgIjCR7A7OhUd2GEHlC6K8TSmHW683hv/PVwaKTuvB8C7XOo02DrtGp1HJQx+s wJsZ+LJZZO5oemvku926E0VXoGHqCxRa1KqM/J+V+MiFsFNJydgSjtzi5u1fUU/PPRLk 9sJARtcSuVlLbcAehzbvvIsnUGWsd6qble+ndXNh6wqHH36YYK9f+VdkDySiWKadkrVd DZVmhzLmqCwnrfdYoFgaeCUBBDKahEcU47t0Ve/lzR7lrFlBuZtMgHrvjIe1iGkd+Ndp pQ53HE7uZFJQfHwdIM4ibrGRXqbTP+2X0WdS4alJqYcpUYV+QpHDyTS5uJFbe8ciz9vD ETGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KuMzNu1a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si9106677ejv.652.2021.05.17.16.05.22; Mon, 17 May 2021 16:05:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KuMzNu1a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S239298AbhEQOT1 (ORCPT + 99 others); Mon, 17 May 2021 10:19:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:46604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238870AbhEQOQq (ORCPT ); Mon, 17 May 2021 10:16:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4806B6140B; Mon, 17 May 2021 14:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260585; bh=ONe5JH3iBMeNwpiqzelk5ZxBrHJfL7kKS7njUV+bDes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KuMzNu1acZ4ESi8Iva/EMxA8XpWQq7myKoNN5PD5KS4sqPiGUwr9NDHGqN0PgB5Wj oUY6fwWIOynbrWwtd7qa4PdV6a756YYVrlB0l1/ymS7b3xq6bsAp0DThZFCJ9hNtLu Hm30by68hPuzI+UmUmbEOMPXgfpIQsNN2hx+oJMk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, TOTE Robot , Jia-Ju Bai , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.12 149/363] rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data() Date: Mon, 17 May 2021 16:00:15 +0200 Message-Id: <20210517140307.646416088@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jia-Ju Bai [ Upstream commit 26594c6bbb60c6bc87e3762a86ceece57d164c66 ] When idr_find() returns NULL to intent, no error return code of qcom_glink_rx_data() is assigned. To fix this bug, ret is assigned with -ENOENT in this case. Fixes: 64f95f87920d ("rpmsg: glink: Use the local intents when receiving data") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210306133624.17237-1-baijiaju1990@gmail.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 27a05167c18c..4840886532ff 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -857,6 +857,7 @@ static int qcom_glink_rx_data(struct qcom_glink *glink, size_t avail) dev_err(glink->dev, "no intent found for channel %s intent %d", channel->name, liid); + ret = -ENOENT; goto advance_rx; } } -- 2.30.2