From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF09CC433F5 for ; Tue, 16 Nov 2021 00:34:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0BD161507 for ; Tue, 16 Nov 2021 00:34:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355242AbhKPAhH (ORCPT ); Mon, 15 Nov 2021 19:37:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:47888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344555AbhKOTY6 (ORCPT ); Mon, 15 Nov 2021 14:24:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6BC2A63691; Mon, 15 Nov 2021 18:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637002783; bh=xvsneodb9iu8RfigzdnqoTq6y9kcK9nZfgU3x8e1D6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q/a54cH13P7SQeOL8SliRWhT45QdGfpAks2DLXhu+QX0asRUgByV1MJI90460IMlu cktFDnZzPgme6ZZlAQ8kPJ4urStJjzWoZDgkFbF+CWcNZFjr2diF4MXMMDpExZE/GU GcwTXx53m8USBxpI4oqAv3BbxlXOzwAX8iM4KFDw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnaud Pouliquen , Mathieu Poirier , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.15 694/917] rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined Date: Mon, 15 Nov 2021 18:03:09 +0100 Message-Id: <20211115165452.422172691@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115165428.722074685@linuxfoundation.org> References: <20211115165428.722074685@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: Arnaud Pouliquen [ Upstream commit 537d3af1bee8ad1415fda9b622d1ea6d1ae76dfa ] According to the description of the rpmsg_create_ept in rpmsg_core.c the function should return NULL on error. Fixes: 2c8a57088045 ("rpmsg: Provide function stubs for API") Signed-off-by: Arnaud Pouliquen Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210712123912.10672-1-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- include/linux/rpmsg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index d97dcd049f18f..a8dcf8a9ae885 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -231,7 +231,7 @@ static inline struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *rpdev /* This shouldn't be possible */ WARN_ON(1); - return ERR_PTR(-ENXIO); + return NULL; } static inline int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len) -- 2.33.0