From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 08 Nov 2021 08:54:15 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mjzTr-0005uS-IO for lore@lore.pengutronix.de; Mon, 08 Nov 2021 08:54:15 +0100 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjzTp-0004EQ-Jr for lore@pengutronix.de; Mon, 08 Nov 2021 08:54:15 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pgTSX9FMWFUKKAQb35XcVX2Q12+4ro3PAW6/S/0UbEY=; b=oLsp66z/St2QG0 CBof8bwzrSE3+lzrwQg5kZquToJiIlCL231G3mAoLRuxa5ZPd8/AePfBv4TY30nBUlJkPSV/NF7Ya ppbI2Z2YhcxCVriGF2W4btHl2zxe+NXYbeXqUJ9KaeHmIyPjcC6hvyES7U5jJlXU2BVYQWqFvhEaf 1fnI/ewmRJ/cz++chO2kn4CyHbHA87UtvGFuDHOa6jgGlh3avKEZT04NGYQmCyHpoN6K0QZO5ct6N fpnoPlIRn5R0bLewLhK4c37tGb0O3rLpqz1E3x2Rqs4gK3VOhZo59p7Cw/qYh3RULSgLNEV3HdOfY pukWY6El2dKCc1a6ce3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mjzSZ-00FdrR-9o; Mon, 08 Nov 2021 07:52:55 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mjzSC-00FdgO-PL for barebox@lists.infradead.org; Mon, 08 Nov 2021 07:52:34 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjzRv-0003kl-G9; Mon, 08 Nov 2021 08:52:15 +0100 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1mjzRu-009vie-Rr; Mon, 08 Nov 2021 08:52:14 +0100 From: Ahmad Fatoum To: barebox@lists.infradead.org Cc: Ahmad Fatoum Date: Mon, 8 Nov 2021 08:52:03 +0100 Message-Id: <20211108075209.2366770-3-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211108075209.2366770-1-a.fatoum@pengutronix.de> References: <20211108075209.2366770-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211107_235232_852995_E9EBD464 X-CRM114-Status: GOOD ( 11.34 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:e::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-4.9 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 3/9] ARM: Rockchip: init: propagate error in init function X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) The SoC init functions return an error code when run on a SoC without support compiled in. Propagate error codes, so this is reported to the user. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-rockchip/rockchip.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c index f0b2484c687b..c185b0cc2b65 100644 --- a/arch/arm/mach-rockchip/rockchip.c +++ b/arch/arm/mach-rockchip/rockchip.c @@ -6,14 +6,13 @@ static int rockchip_init(void) { if (of_machine_is_compatible("rockchip,rk3188")) - rk3188_init(); - else if (of_machine_is_compatible("rockchip,rk3288")) - rk3288_init(); - else if (of_machine_is_compatible("rockchip,rk3568")) - rk3568_init(); - else - pr_err("Unknown rockchip SoC\n"); + return rk3188_init(); + if (of_machine_is_compatible("rockchip,rk3288")) + return rk3288_init(); + if (of_machine_is_compatible("rockchip,rk3568")) + return rk3568_init(); - return 0; + pr_err("Unknown rockchip SoC\n"); + return -ENODEV; } postcore_initcall(rockchip_init); -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox