Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9413364pxu; Mon, 28 Dec 2020 15:41:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJ1Ne/PYre5JRSW6hTLx/9ZbQFjZDTsy2s55a4PtM2EGRGGXoSJUhdOlDWrou7BvixspVy X-Received: by 2002:a50:9ee6:: with SMTP id a93mr44593826edf.174.1609198902648; Mon, 28 Dec 2020 15:41:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609198902; cv=none; d=google.com; s=arc-20160816; b=sf5xtrkpsZlBSZLviHlG3d9XAJbcFU5M+ofaI21slGGCTFszvt+2Cn2D1NGJ4/boyv h90QvcGvSGzCB1hy2HJyRlir23zkXGeY+KbSsKiH/TUpO2ffgBqNd/aRUKSc3K5sjUCp yCRQskd/rZN8ZPcBG8iIfXvzVIdvULkJbzV8fywUBiD+29QOgP9TcR8besu+RdEroWSa 4nNM1gIXo2C/dkJSV+xDTUlqiDi/wt0BepZPsrojsylG6CvDwCvT6QaWf04VB7Okmxwc M7Ky7rhbeGtn/fYgH77awB51rxsSwO/giPQ/jqqT+pnJtQFRTU5nUyrrIXpusyLJnopW +H9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tULa1CWtPp2akP73P6cIuah36y+uP6BdVz/l0OmSErw=; b=JhjMtatZxzx2djZzgq2RKvX4H8j2iCYSC/lQhCc6I9kJ9gNq5VUmrbIEZ6zDJF1R9k ibyycCMOEvsLN5yFCN8Zpyf9Yl/7q2V2K150LI0YbLjU3skVgTuqjin6lUvdCbjd444c q71Ec3bQZOWaH1LNBzhpSRkD4ZpgiwTuyZJ4goI6+OnBhLjkgz9IAdY/teD3evywRROl lbNlOsJcQqYkKHj7qAFm53ZIMZ7OXyoKz1ioLKmXSpHhYyJhwEMF+2BovzSZse/4DVK1 bJKlLfzGjwLFCb0P1ZJ5hGGY9hMMyVuOKGGUpU0UTPKCczoC8l6GtiRKY4NnWZVpreU4 cbog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ID2n2oIJ; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k29si21531864edk.367.2020.12.28.15.41.20; Mon, 28 Dec 2020 15:41:42 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=ID2n2oIJ; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504764AbgL1Ocj (ORCPT + 99 others); Mon, 28 Dec 2020 09:32:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:38964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504578AbgL1Obk (ORCPT ); Mon, 28 Dec 2020 09:31:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0844D207B2; Mon, 28 Dec 2020 14:31:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165885; bh=OIsg5iqHskreU7phmPvjN1qdo3ycv5upKiRro15Yhcc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ID2n2oIJiqWvVddokUnnoNTJwE8+8B+BL9us1OQukDbIA7OsUTvxpqGxye9B+0+ZT nGFfi8bqeSSnnEWd1EAX2HWhfJJopnoza0EQb7y2i6LGuiuLhbU38fEy+t6k6OgjEk 1D1XLeGjzO6ECVVJ0FhfB6fdHAeihDOD+faOQGgk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolin Chen , Thierry Reding Subject: [PATCH 5.10 690/717] clk: tegra: Do not return 0 on failure Date: Mon, 28 Dec 2020 13:51:28 +0100 Message-Id: <20201228125054.030386186@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Nicolin Chen commit 6160aca443148416994c022a35c77daeba948ea6 upstream. Return values from read_dt_param() will be either TRUE (1) or FALSE (0), while dfll_fetch_pwm_params() returns 0 on success or an ERR code on failure. So this patch fixes the bug of returning 0 on failure. Fixes: 36541f0499fe ("clk: tegra: dfll: support PWM regulator control") Cc: Signed-off-by: Nicolin Chen Signed-off-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman --- drivers/clk/tegra/clk-dfll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/clk/tegra/clk-dfll.c +++ b/drivers/clk/tegra/clk-dfll.c @@ -1856,13 +1856,13 @@ static int dfll_fetch_pwm_params(struct &td->reg_init_uV); if (!ret) { dev_err(td->dev, "couldn't get initialized voltage\n"); - return ret; + return -EINVAL; } ret = read_dt_param(td, "nvidia,pwm-period-nanoseconds", &pwm_period); if (!ret) { dev_err(td->dev, "couldn't get PWM period\n"); - return ret; + return -EINVAL; } td->pwm_rate = (NSEC_PER_SEC / pwm_period) * (MAX_DFLL_VOLTAGES - 1);