From patchwork Thu Aug 11 07:58:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 596644 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp667466maz; Thu, 11 Aug 2022 04:48:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR5eyjPbefE7AdqEBLv4EZGKFcdCyK7jdBui/JXsM0BLaVx87I7utgtFKYsyEYoWTNPcFuAj X-Received: by 2002:a02:c801:0:b0:343:4578:8a0 with SMTP id p1-20020a02c801000000b00343457808a0mr2986047jao.97.1660218481339; Thu, 11 Aug 2022 04:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660218481; cv=none; d=google.com; s=arc-20160816; b=ebM6OBzVHMNRHJQZp5NgAmws96v84+Elv/LfxPKrPP7qQbK5ytDfyCMlaPKld/QgOp 7ItKLGGirigxqOS7xRH+KS+QaU5QWtADkiwsDn5bPjFSX2J1O5W/LEAma/RdUiaShLZ2 mx/8hRPLbzKZwWBMCBosaXNkG/X5BxfD0RCrCIXuAjw+6mog/eXDbtl/wDUN0UgN7QpT 74B0LZQpQOmqZWg3EWUJ6amfJx3V3sdlT0HgNxhypg8GbUTFDoI2ySVQQAn2q7S40ieb Fyj9XEQYKyfaR4VhMZAZFlPgMKmWXWBEG2V8FWg8GDpyFZS5q+hyrTYV0ZtqaFNuCF1I db9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9FNaeLXd2hvaVirVZVwrcyvdhUgSsTwoIV49KdfNmpw=; b=K2jraJHsl8sU9LDdmoRiS2UAS8hJnZooFaK656VLllQ2vrSw1TaHMIA8/jI7euoGOi HK7CCNFZ2d6Pbl9NughDx0MJVgZGfjlojw3qfqzmiHI26skSuFCUr5jY8pjwA37lOkpO O6ZrctfWLbomtUjYp91NmXmaEyoxKGyDqKc0uW/rOuSOe+1iDZ5CJIJEyrtbrErt4n+8 K44ELlJoMHoaNqwLF7YVbxKwPZhn2cwD9rf3RbKqjtIE5wgw8sp/UyhsPb6/5mYhpgwr 5/foY0V+PegRS2tg5yVYcPKn24rpEMOnoxFTmnkYwhGA4GYOp/56NKZzerz9KA25/ueJ uESQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AKoDxDzJ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a12-20020a056e02180c00b002de032e001esi7426718ilv.117.2022.08.11.04.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Aug 2022 04:48:01 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AKoDxDzJ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 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 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;