Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp431900pxj; Tue, 18 May 2021 06:40:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPKoWU14SHgOdKP2UOwRfVbxWq7ZsHBHwimhuxmFukTYpL3Xl2lBMOY1Nj1QkjwlJ7BQO+ X-Received: by 2002:a02:92cc:: with SMTP id c12mr5454834jah.30.1621345225083; Tue, 18 May 2021 06:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621345225; cv=none; d=google.com; s=arc-20160816; b=UgUmC2Q6xk5nZY4AAderVIfJC9cbMdw4yEUC+96xXBtbcqHt8uiE1FfHl8SFRdvz8U n6rJSK6UE8hRDDzbZ8rLT01Kfv3KpHwlxiO/5Sw7dlQCZaWXAnsiRNT2fTpu7RRpMl1y 0+0g+Rzlxtz93Cn9omsivDZgW/AWr5XlYcAuyV71pvQIktJjWshq4/GMV4bFavQRClRZ xkt90TeD7G5UhSgrdSLT6erj+Qv3FWDzjuzKhj75XNZeTSZT+nBXXVHeCL3lltpecchm k1B3cUiNPF7td5IwprG/PERMxieR/8XkHHTwkLQIR+CUxQOlJNfAFYl/D4G6k5vTmwzZ /nvQ== 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=g5IU35iwYumls/SQpIbjBuvS6+Miz7hEqvT+2Wg/8Ogb0hNPeSqyuRsRy5XItbg2N/ aJLsMd74eZcnSUPlcA129yItgjgO4XUCBKL2PgYYpSZegE23WNShbATAtdkFJ0hw0q8G I50xTsVC3MzGImEvlT1/0XyuMRF391j3LeaoA58n36RqzfwkAUyoRNeGPCb7If/OFZWB VDFU2zlWxkUFxHnW5sHSwKncZgW3Q50lvS8gWxAuQb6acbwww6Ttm5QU5e2PZTmI9vOg VZAHJMKEaW7Dymky8bChEaIqKV9YcAuFAWY9PZJy/1jYOlxGmhCU/mcs5+96lWaDhqx3 Iikw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TxqXfijH; 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 u9si23127030jat.83.2021.05.18.06.40.11; Tue, 18 May 2021 06:40:25 -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=TxqXfijH; 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 S243371AbhEQPjB (ORCPT + 99 others); Mon, 17 May 2021 11:39:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:39294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240312AbhEQPXa (ORCPT ); Mon, 17 May 2021 11:23:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8847B61C9C; Mon, 17 May 2021 14:35:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262120; bh=ONe5JH3iBMeNwpiqzelk5ZxBrHJfL7kKS7njUV+bDes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TxqXfijHjppqwG2Yqs+NmhZtjCWDlRGDswFphzO913zYq2aFN8RE0pBRjobBheRh1 pLbY0EJ8DWP50thMNLYVg7dYXtbXc3fu56eZdVh4oLtuUsI4oF/dkH0NEQNTz+0JlJ xN/JF8kvJa8zc11mREN0LWDLTZX/N3I9Lr6EKZx4= 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.10 115/289] rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data() Date: Mon, 17 May 2021 16:00:40 +0200 Message-Id: <20210517140309.042354896@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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