Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp460039pxj; Thu, 20 May 2021 13:28:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtMjuShuWbUkHepJR8Z6NwyjfJKcgFAU4NKV1w8y4SOFYSsV6yn8VSQWI1+2y/9V+ngdO9 X-Received: by 2002:a5d:9343:: with SMTP id i3mr7502701ioo.77.1621542519097; Thu, 20 May 2021 13:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621542519; cv=none; d=google.com; s=arc-20160816; b=ScjGT3OZb9n0YSpBpjqZYjItrvXl8XD0SU3amvAcvHCHs8oykTKjcT0NPSHkQmK4AE /zJDWX3t/N50cghVw7NDdS4K9Y+yyzYuS4gqEanoYSw/Mo+td/vKKNQGyQJqsPesUbpy iqqsFN80TMuDMIr4KuDjHflsN65jm7Yg+/haAC61e0GJPuRHK/IJJYiV+hnrKOqoNI6C zRrMohtQDR5hLRSvRZ4eHVr6XlS7nGBrLzU07KFnYHF80txsNC7dTVGd/ygoMzQbN33m ViCOpmMpphnhGwwk6ePK37Xn4dhR45adq3xUGx/kgoZn4Nn8ovxB9xYQIADQihQgp3/l ZNXg== 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=W/0MSkJYleVjHvTdUb0mFuWYrteZmKFaT6QQwZ1y+T8=; b=XWsDS+cmcwlk+JfdhtIJ0Kk13soV9jfIfAr1nP+CT5728HtT4ApbLoHvncdLWZF3vx sBXl+MRUlPz6QEtDtWokhuCAFYSCyRTt2snH80+Y81rL5NK3PknrfjRvLnZke85Aj4ee 2Gni5up4jBIXhFA/XX0K52QjOJQw3bY2ZoGSZitkk81sPJG16SkonYLniDfIEibxGwGP etiV6Plns1PAsyUNEp14DjZ30Hua1QR4eekWkzUjh+IOnfm8vAsgR7BbbPmwe3I+BK8H Ey2CMK+BG1IovG2Q8KXovUTKuwW5roehCVg7OBiIWGobdIwDoGcfK4bF/btl38WMTek4 OoMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AtGWojxu; 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 m17si3315380ilg.130.2021.05.20.13.28.25; Thu, 20 May 2021 13:28:39 -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=AtGWojxu; 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 S236422AbhETKxF (ORCPT + 99 others); Thu, 20 May 2021 06:53:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:39794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237349AbhETKhi (ORCPT ); Thu, 20 May 2021 06:37:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E02EC610A1; Thu, 20 May 2021 09:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504475; bh=DQsBNNtWUZXsa33j4Y8bton6tyEjC6Nndz4xV3wykVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AtGWojxucK/6a+1BsqP8DuqnC3mKGv02SyR3hxA+oEZamjv0hxK1BIqX+G6xc5Lqc AAif2MHY+A9qtY6Y/XFtsxUEtMmrFGCbqTKwXgeWBFH1SC/SLvJvMftuSb10R0OC7d QMRyCI81KOwnUE+Bun6R4HwL0BtFgbR6vGTGTxk0= 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.14 262/323] rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data() Date: Thu, 20 May 2021 11:22:34 +0200 Message-Id: <20210520092129.199979195@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 7802663efe33..67711537d3ff 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -856,6 +856,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