Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp463676pxb; Sat, 6 Mar 2021 05:38:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpSzrtXTRFsGrfvYFwkWR1VtoiGgKubiu2S6ZW+0sOxXwrwdMjdhSulchbJzu+d0UW9oFL X-Received: by 2002:a17:906:9bc5:: with SMTP id de5mr3720542ejc.284.1615037924221; Sat, 06 Mar 2021 05:38:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615037924; cv=none; d=google.com; s=arc-20160816; b=0Cbv3ktkIkCO0+F00dyFr2T8CmSiMfefEbFKLQYY7RzOFT/8eeX8oi5AunAporgufi YF9++Gyi8wsLz3Y77QMucsQGdtCoJI0cyML+TOAnyzbW2ekRTOFUMKMDh9yqlRGqs273 rKXWAEpRgFUHbj/AhvN720sqf9EpUvCwdpi51WlCd3QFuYOAsZHvFFMY283Oq24t+uP6 vaPI5vnwX8sdbY5ZTOzgvq0ffTjpbMtuzVL/3Sd1ntpu3Ss9vGeFKuBrRtVlcHWk3xOD ZL5Frx7qjC6U7Ty4RlPT4OC26EikpBJivrgQzH8V4t+cA10zprEDOdg0rQ++uD4Q33u/ yuEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=lsCQCAQNCQuZMTW5LL9WzweLlGjeyMxQVHgG7fBsL1o=; b=Qlj4egZ80wWX22S/KzdtbNBPvvLjkgeq3qUTCRFHp+8wkU9cqyAcoT5wO+fQm3KJsY xfYWkj2neXC3tyWn8lhZTBL1KoFG8hCLF9dap0gD4tDINgKjchZJqZONCr1LPZ4NHsZo X85oEv/BPk+8CJTOg+juyD+vxugthp3Wj+/nZm7zpLSubtgxRTLJDEUbmp4Zj+NnZQiA BXipGsL914jBVzYCFJy1GWsaOebalADxLjQY+M++ZVP2xexzXwax+39Pm7CGdPMuReLS /is0PjJK/hXhhv7Ex0JOdJD7TXAxzoWjs1hkZNKxTa22ZlaVUydyzEeAqS1bpNeVP+lC sIQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nFsDYqlu; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si3576604edd.179.2021.03.06.05.38.20; Sat, 06 Mar 2021 05:38:44 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=nFsDYqlu; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbhCFNhV (ORCPT + 99 others); Sat, 6 Mar 2021 08:37:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbhCFNhE (ORCPT ); Sat, 6 Mar 2021 08:37:04 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58266C06174A; Sat, 6 Mar 2021 05:37:04 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id q2-20020a17090a2e02b02900bee668844dso643863pjd.3; Sat, 06 Mar 2021 05:37:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=lsCQCAQNCQuZMTW5LL9WzweLlGjeyMxQVHgG7fBsL1o=; b=nFsDYqlu3hvsMzwin6DRWtl6v0tWFYrc9nJxNuhQ5iTqQBILNm+rFpxCEtEoCmxeb7 b4uaQFquEQPTqYTixUg2P5JsTWq4wySzYU3biIp2sWUyeypZbhUKFKLbIyHXm+CishDs 0/QpkLjfkeSYcXLIlBWfaidI8Ke2r0Z0kn+rRkChLlh9InnElKSrY9nkpPfuneUbRUdx 7dcsAqcnJl27Ct6nT3eMCYTXC+PEFBzoIH5oiboKFQgGcyFrHfv7m8glQcBvtO7d4IRS ZmmX1roTgcOZAEAi0h9ZC/uK4Xm0wmsNtdzsN8pAvCQj1Qr/QHR5fWiJY/+Qk7r7CxrK N1pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lsCQCAQNCQuZMTW5LL9WzweLlGjeyMxQVHgG7fBsL1o=; b=UhVO9sRqWZDerVR0aBZu2RBHhhPXXubrrTJthdhnF5HktfEQoy5rU0eSOiBpfsVxyB 5wm91tKp+UfJw7MeB9RAtpx2jLjyFw0nMOBmD6CvdZDtRyEUri+49I/p9GSWO3fsFlIA 8AnPMdxjVEEL56Z1y4JQKj8z35Rq1FL/PCtZrjq285gpCrG5BxarJ2wj6DCAUURrvzHq qIxyYsHLrhaNCtTq+Jw+euvGn/e3Lm6drbMeiWNhC3+FGTs2NO+G7sZvYH9luLiiUsBO bo5fiayqidFlFh0coqd+eL3eZyeENphRSyZqYrbN/QNYpd2iBR8rC6dAiWvxyAzbEA1L CGbA== X-Gm-Message-State: AOAM531q+SbCI02nqmUeyVay3/KgI9O9o+1UhL1Y0rY6KuEzzbJHq4Wo 6zbyy/aJhqtjDrEVHo02GLM= X-Received: by 2002:a17:90a:c20a:: with SMTP id e10mr14798599pjt.221.1615037824035; Sat, 06 Mar 2021 05:37:04 -0800 (PST) Received: from localhost.localdomain ([45.135.186.66]) by smtp.gmail.com with ESMTPSA id e12sm5345659pjj.23.2021.03.06.05.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Mar 2021 05:37:03 -0800 (PST) From: Jia-Ju Bai To: agross@kernel.org, bjorn.andersson@linaro.org, ohad@wizery.com Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data() Date: Sat, 6 Mar 2021 05:36:24 -0800 Message-Id: <20210306133624.17237-1-baijiaju1990@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- 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.17.1