Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp379273pxj; Thu, 20 May 2021 11:25:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrktCNfkjMZ+qrU+WE1/wEEg6/QN3z+3GU9hoCYmJqUmBZbC/ieK77sjcfeCbOX9CUFE7d X-Received: by 2002:a17:906:58d1:: with SMTP id e17mr6044858ejs.179.1621535141395; Thu, 20 May 2021 11:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621535141; cv=none; d=google.com; s=arc-20160816; b=rAXjiMj2+UTjDeZgEB6I4mA/GIenUEUXDtop3H4zDtNpQzDdDB9rmO1oyl1TiYEck5 /dJT/TUYifETMEJFUluimH2iLeQ2VK/sefbycZF5/D81F6NJuERwSHpCL6oby6qhf2u9 5Sqq/WsJn2BMmPcDrNnjTw/Hyo9PnpPg33JOrcbuc+F1VC16d08pR25e/rMCJ/bn15Q2 cUEqUS52J8Y4t+wTEjiiEqYu/z87AS/pI980K3qq0GFIyaqkHABoYpmB8NiLX7wtJgCb 3Qokj4D9uzoRvtHkANK+5d2b1eAmWozbf8Y/H+0cpfi9+grGMkrJZf2n1VmDlghjDKCV Q+lg== 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=uQxTywZidM8MVTKgXhZflY5Iw25yKOWWN9ecLhBd2zQ=; b=DLIk4QmncS3iR70dDv8VU/SzUD75MN/W3A6BUfdTOluP+K1EJRTkOckI4jCCe1xJzh n4B4hgrJ3u/caHV7XZtXgHxEWgaAfSBoRLtrLo9d/ihomUoFd4ghkU15rNSqVGuUGji6 UVHARivNFUSDCBWvfNFFOGkDx72TCpmHxUqLl0hu7WpQuPZK5wlZWvej4p8lYs4ZqToj j+nQq3Y+Dja9A/k/2s7fZgKIE24WFICycolBn10alVVWRQ3XH2YteESVWnppmB7yl1jk T4wNgTmmFOMpCnHY5KStRjQmGlqfay3s/QOcA53iYLcovnbG/vFBU8+WZMhuzWDoaTxr ktHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=G9bTcSJi; 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 sa6si3128425ejb.607.2021.05.20.11.25.15; Thu, 20 May 2021 11:25:41 -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=G9bTcSJi; 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 S236286AbhETKO6 (ORCPT + 99 others); Thu, 20 May 2021 06:14:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:41926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234962AbhETKHE (ORCPT ); Thu, 20 May 2021 06:07:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 01BD860240; Thu, 20 May 2021 09:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503694; bh=XEPPqUppLSubaFZoMudnOxtDnTqzOGcyIWwgCIS6aKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G9bTcSJiTt/OjmBUMaDZqUYNny5dbzS8/bvvrzOHcB1uTROtx/4r+dRci1zRqm/qA pzI5D7l0K7XBF57JwU72Sw6P3KM9UKAVSYWWkd6EsSr48U+sdY3RHM3uPbzYhV4i+4 XP0KUBOhBR5Lm98V/PN6ERKikW54xdvm96Et8a5Q= 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 4.19 338/425] rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data() Date: Thu, 20 May 2021 11:21:47 +0200 Message-Id: <20210520092142.527353817@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 a755f85686e5..8fa0f0eaaf43 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