Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1230187pxj; Fri, 4 Jun 2021 09:07:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLFR8vtvXh6e6f03jXHG3B7lcvIMklCXeYxM0Y1PKZfEK8rZn2xaRbmx1AsNFcf9uVi87A X-Received: by 2002:a17:906:e2d3:: with SMTP id gr19mr4776317ejb.525.1622822861796; Fri, 04 Jun 2021 09:07:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622822861; cv=none; d=google.com; s=arc-20160816; b=bbbpgpJmKuYXAX5+MwyChhecTPOvs3kV2trmNxgOQKlMuMLw7OnZ/PY5QS9vPwd2hY rFV3Lh5/ZfUN2FfFUHr8Nnff3D5HysUKVfjFAwSsPZNJ28Le1UKnb5G4gwHRujf/sbeo 2Z3GFnYSXWWU6Rd4+JeH5p0ArK5ERk3nE1iA5ELwwC6ISqnxln6Hhgu8UUFyCCEIkvvQ 0/BWBO3crSP42zabUkZoMk7Kmr9W/1+7D8xnwR6QSIPmhOraQZQA3auEy0mMN/89OLgR j8aMHGRUHkW9kGzAA0v3clBJlxDJESofi/jSyldHAgjk892NVoykGRohOFbTIB5EA6lX HBUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=fxFpnfIYi2rU8ay6+UqLYPW5crSnDErw0UJVcTcwF0Y=; b=fURcAr1zoURf6qZY7JCO3AAEpE0EoQWETXqF7dVAyx5hlMB2ANB5A7aMfKvwSLOxbx SIeLTnzUqcNx+cf3XpWZI3UB56hMZq5J6oC+r5WORZuSYexW417D4TgpIB679V1wsR73 lXaNMofAYWPRy/KnCVz9htgYpeegnKIlJ6JGlnXcmxKZsXTWCW0T7aNF8QxWUFqKvSec tzfxyJz5DyKjtVrik6bjb7t0SrpqEIzDCDX+q38km11Job5NHDZU4gK+JE5xWJmUisTr O2v2Ka1/ghEJ7HsJJ1xRhizR3Q8Iibw7EJ4tPFZ4mJn3AmhbTfuuJR/nSUNdbbozZyIB 5wcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=l99Y4Tja; 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=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si5140340edt.365.2021.06.04.09.07.18; Fri, 04 Jun 2021 09:07: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=@foss.st.com header.s=selector1 header.b=l99Y4Tja; 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=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230406AbhFDQIB (ORCPT + 99 others); Fri, 4 Jun 2021 12:08:01 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:20606 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229809AbhFDQIB (ORCPT ); Fri, 4 Jun 2021 12:08:01 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 154G1ust029477; Fri, 4 Jun 2021 18:06:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=selector1; bh=fxFpnfIYi2rU8ay6+UqLYPW5crSnDErw0UJVcTcwF0Y=; b=l99Y4TjavQiAod+H0PqeZZ0W7dBmxLpoMEDw6YPHbZDJvA/ODPYVTIWVpVQavMMyXvqc zu3KiAuHik1Gzhr3BeWEyfyqqu25O4V5ollnt5CAYDRoJ6LPrSzise+M98RavFIuZBuH SBkxU4fxIiD2yaBrJjovWmMkWltFHjYtxUl616HzriSL3+UN3mZah53vBSJOovroYDZg Qnhcem3PNj8eIlY+Qp/hHgi51He/1t7w+BzD/PsN5ogAMTayavMo74EdKTqaei23Jnq7 SVReqOmyJo7U83+/Mno9EJcoDNqw9kD0DAKYd1Bv9fEIK6pH4l5/ll6obokiyeWjkrXV zg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 38y4ye5ugf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Jun 2021 18:06:11 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EFEFD10002A; Fri, 4 Jun 2021 18:06:10 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id E34C622179B; Fri, 4 Jun 2021 18:06:10 +0200 (CEST) Received: from localhost (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 4 Jun 2021 18:06:10 +0200 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier CC: , , , Subject: [PATCH] rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined Date: Fri, 4 Jun 2021 18:05:49 +0200 Message-ID: <20210604160549.2122-1-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-06-04_11:2021-06-04,2021-06-04 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a minor fix. According to the description of the rpmsg_create_ept in rpmsg_core.c the function should return NULL on error. Signed-off-by: Arnaud Pouliquen --- 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 d97dcd049f18..a8dcf8a9ae88 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.17.1