Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3518586pxj; Tue, 15 Jun 2021 02:43:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEJME6zV2KWBuQH7Ekkah1GuAP4KFilf1CgUc/xvcp7kF4DOyF4ES5I5iaOlF1fdbsroix X-Received: by 2002:a05:6402:4395:: with SMTP id o21mr22121037edc.163.1623750182950; Tue, 15 Jun 2021 02:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623750182; cv=none; d=google.com; s=arc-20160816; b=jcDDYqttqcSFqlTlGPj+QONUQC6Wubyir7RJetTsgOJEmCRkeAnnQHG7968HDU2B2v DuTw7e2GOBSDlbYyVAHAvNU+IyTyzN76w/BeVtNG0TUL4pDptRoQMtHv03nNKLLgD2/O S+KNu4HEv4lhbr9uiEuwXZTcjFbH6D1UcskrBoPK/4ykyZd0OynXNVmzmRTAW0RLfwwR WGVAI933m5PAgeqnbBceeyH8HGNl25nD2oLF3z4uX8fMrul9UROmDMx/3L+CfDQh/fJn hjQaJnM5TNhIzNv2dZnKgzWeaDv+E5/j9OGFA1KffncTH9T8isNt4QAns8k+s4q6dnUV t3pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=jAuotF4c86rxZSOIlvdZ+ycwjSRQBepEI/MWALRbCUY=; b=PH/7j+jtn35DTN3G0Py9/JYnpjTde0GgjjtvovA3w8oWes2S4lTe0N2nsGUtMNXqJg ndBSkGM4AZs2IxEijq5nlVCNR/mD1NW8LPWBttLyH/qY7mvZppVroD2OLyjQciqIgJ+v kyI+SYNMI5V1sJhBiKpbfJW/j253z093VfjvLpAuzwih0fMyQUqBd6bcG63xf5KNO+kw aL4pusPIFJx5EjhESBWL3XcPX4GoQhaeOtRQ8UDx/5Hu0GMrGH7XcTfG+cUeiRQqWmJl EjZT4OdiQ3Jh2+5d7b4S/JN80O/F4G8SJqhwUG9gnZTollxwuOBPui+/fxHi5GcnovN1 VWXA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 1si12994479ejm.532.2021.06.15.02.42.40; Tue, 15 Jun 2021 02:43:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231523AbhFOJlp (ORCPT + 99 others); Tue, 15 Jun 2021 05:41:45 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:58414 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231187AbhFOJll (ORCPT ); Tue, 15 Jun 2021 05:41:41 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R851e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UcVXEi._1623749971; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UcVXEi._1623749971) by smtp.aliyun-inc.com(127.0.0.1); Tue, 15 Jun 2021 17:39:35 +0800 From: Yang Li To: geert+renesas@glider.be Cc: mturquette@baylibre.com, sboyd@kernel.org, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next 2/2] clk: renesas: fix return value and unused assignment Date: Tue, 15 Jun 2021 17:39:30 +0800 Message-Id: <1623749970-38020-2-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1623749970-38020-1-git-send-email-yang.lee@linux.alibaba.com> References: <1623749970-38020-1-git-send-email-yang.lee@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the function returns NULL on error, so exact error code is lost. This patch changes return convention of the function to use ERR_PTR() on error instead. Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/clk/renesas/renesas-rzg2l-cpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/renesas/renesas-rzg2l-cpg.c b/drivers/clk/renesas/renesas-rzg2l-cpg.c index 1fcea17..5bc7e87 100644 --- a/drivers/clk/renesas/renesas-rzg2l-cpg.c +++ b/drivers/clk/renesas/renesas-rzg2l-cpg.c @@ -183,7 +183,7 @@ static unsigned long rzg2l_cpg_pll_clk_recalc_rate(struct clk_hw *hw, pll_clk = devm_kzalloc(dev, sizeof(*pll_clk), GFP_KERNEL); if (!pll_clk) { clk = ERR_PTR(-ENOMEM); - return NULL; + return clk; } parent_name = __clk_get_name(parent); -- 1.8.3.1