Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1363146pxj; Fri, 18 Jun 2021 05:41:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGngRdw5AUjlKka7TtlDcfRXjnH5hhLSY987LJ1LZsupYjekX/KP/GtsLvi099GHtjA/sJ X-Received: by 2002:a17:907:9617:: with SMTP id gb23mr10871287ejc.483.1624020078811; Fri, 18 Jun 2021 05:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624020078; cv=none; d=google.com; s=arc-20160816; b=FuOB7EfFr8I65pgKavn08ZBvtdD+eqsuv5lTHjz0FQf6icV6QboLRoxv09fSiCh7Qs QuajEGnLoVxqzTt2VytdV8vipQBHx00LJLR53I5LMYhYZPZwoszjehvBOxOw32+Gd2zh /erd6C8cZWShoSo/5KIKWToFgF8aFmAZ/V9BIOwMpRJuFbg25zgpatQMO6V4ZfMWmLkr sSzDbHFenYMjW36eWO3mpopA9gTbZLgEYQdCrSY3fvCmbb2NSfPQkafX1IykWPA4A7R+ nltn/VFK/j9KEE644KNhEvoZCB4w7ocAzW0AXJFzSgNqoqCBR3S8Q5g9jGmCYBUyJU3K 6Yhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=8nhuphCekr3a7AVYaC4dM+5n+RJxAilaQYaFU5oznsI=; b=haCHHY5Gamzsx2ble/wlzRIqZcDq1RrnJZ53z9fmwWjsQUw7oGt5Jlv6KKcehWKUnt AEEr3U0xhLv7gbTye7vTO5Tp09XrrX0Z7VHmsurB9nggZC1OGPuiBY50buszmxhOOf1a 1gTMuuZ7Vz1XfDN8LTP4+4RFtZWTUEtLSdCZ8YE/0tiIp0cFsUVa+gU9fPpDccPjO3Rn L0U/CY8m3djHwtMT7IcHZs3G13tYvajddxXKhhlXz0omKAxDc0YAuVRvyUthR+Hd4MV0 B+EX37DP+0BHJh6uxRuEIjLnlFDoRErCbnH38hZoP0q6bWLMINq1VhhkHWvoTLTDRA7Z FdZA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si8846003edc.556.2021.06.18.05.40.56; Fri, 18 Jun 2021 05:41:18 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233926AbhFRLWU (ORCPT + 99 others); Fri, 18 Jun 2021 07:22:20 -0400 Received: from mail-vs1-f53.google.com ([209.85.217.53]:44958 "EHLO mail-vs1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbhFRLWT (ORCPT ); Fri, 18 Jun 2021 07:22:19 -0400 Received: by mail-vs1-f53.google.com with SMTP id x13so4735940vsf.11; Fri, 18 Jun 2021 04:20:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8nhuphCekr3a7AVYaC4dM+5n+RJxAilaQYaFU5oznsI=; b=bPNj7BkvCSzFNj/JfU1zByoiWDOQzxjl9qDxjvMIyQdLDNQAO3sdx+iV1glV/T77H9 Ar5hPODuCaEoMFkP2wZEFsjTYq0xsZ3tocbfAfsgzcKkvJO6Qf09DgVyMUbLNYFIThQM vp/miEJoPNp1W7A0iNIjwk7t9GXiikZAhOC2b7A/Wj9utCHVqNToXzSGQLZcLCF2G5hD Ehz/XOSjRh56FF8dSpcF22/WGZupwZdV0vGzbaOYttlyd0GPWVkhR8shT2FhXBidYUEI dSRauMz1hWqf6rnkvlJ5BCaNT9ee9SeqB8Lstu+1J1tDQ8NrhfFpZNTCbIwpwA5e5r5K oSIw== X-Gm-Message-State: AOAM532Ps54s36BKp1Il9vvy1kmOChGanCvVxUjSZUujlrk9ColxKqTe Bw2+rehar5tJK9DJqn5z2IzXmnt07JyAFkYmVgE= X-Received: by 2002:a05:6102:2011:: with SMTP id p17mr6036586vsr.40.1624015208410; Fri, 18 Jun 2021 04:20:08 -0700 (PDT) MIME-Version: 1.0 References: <1623896524-102058-1-git-send-email-yang.lee@linux.alibaba.com> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 18 Jun 2021 13:19:57 +0200 Message-ID: Subject: Re: [PATCH -next v2] clk: renesas: fix return value and unused assignment To: Yang Li Cc: Michael Turquette , Stephen Boyd , Linux-Renesas , linux-clk , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 9:25 AM Geert Uytterhoeven wrote: > On Thu, Jun 17, 2021 at 4:22 AM Yang Li wrote: > > 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 > > Reviewed-by: Geert Uytterhoeven > i.e. will queue in renesas-clk-for-v5.15. > > > --- a/drivers/clk/renesas/renesas-rzg2l-cpg.c > > +++ b/drivers/clk/renesas/renesas-rzg2l-cpg.c > > @@ -182,8 +182,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 ERR_PTR(-ENOMEM); > > } > > I'll drop the curly braces while applying. ... and the now unused clk variable. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds