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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4684C19F2A for ; Thu, 11 Aug 2022 11:47:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A54DE84926; Thu, 11 Aug 2022 13:47:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="AKoDxDzJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 79240845A5; Thu, 11 Aug 2022 09:59:01 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B8C06841D2 for ; Thu, 11 Aug 2022 09:58:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=lee@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5EB0E614EE; Thu, 11 Aug 2022 07:58:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59A2AC433B5; Thu, 11 Aug 2022 07:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660204736; bh=Hke2cx2Ssl5DwKxwy5eLjpGyQ6C6uKBM9rNYQst8cxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AKoDxDzJl5+kEv5lrjevRiPv4qHUPOylB82IhhzlyIEqVCUVih/x3Kl2qD1ZYZYQN iqP14OneMOB2ItHSRKrHFLTucuJ+fmkBy7efZ2YyY3tE3ZXctMPsHt5ukf+J1ZrQaW 1q7tnufs+gsElmZ8ZtkXqGUEk6wTCzDHVXzqAv8OU/t5wzoXrv2ybCKtFOYXx83/zn CZOg2bA4w3CDUYwLiQTzRXfpXVlfvbqJaQRG3FTcitqnK5sjusNOo/7CFihbWgBmN/ k0HP/ozX43t9UPaloa1RJmx1kyvayEx01Ay4VEim3KmMO7SGt56eL87if9V/YIJuLE 40p35OU1Bqdkg== From: Lee Jones To: u-boot@lists.denx.de, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com Cc: Lee Jones , Xavier Drudis Ferran Subject: [PATCH 1/3] ram: rk3399: Fix .set_rate_index() error handling Date: Thu, 11 Aug 2022 08:58:46 +0100 Message-Id: <20220811075848.1791050-2-lee@kernel.org> X-Mailer: git-send-email 2.37.1.559.g78731f0fdb-goog In-Reply-To: <20220811075848.1791050-1-lee@kernel.org> References: <20220811075848.1791050-1-lee@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 11 Aug 2022 13:47:22 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Functions pointed to by this op pointer can return non-zero values indicating an error. Ensure any error value is propagated back up the call-chain. Signed-off-by: Lee Jones Tested-by: Xavier Drudis Ferran Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index c0a06dcaed..0af0fa9e7b 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -3005,7 +3005,9 @@ static int sdram_init(struct dram_info *dram, params->base.stride = calculate_stride(params); dram_all_config(dram, params); - dram->ops->set_rate_index(dram, params); + ret = dram->ops->set_rate_index(dram, params); + if (ret) + return ret; debug("Finish SDRAM initialization...\n"); return 0; -- 2.37.1.559.g78731f0fdb-goog