Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp203449pxj; Thu, 17 Jun 2021 00:26:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9S/ns77JQMVFYLj9x4iDpU8z3J2+OmeWaut1Oz5daA5FpphA5kvWZXwGrGBu/WkRMPOg3 X-Received: by 2002:a17:906:240b:: with SMTP id z11mr3671039eja.545.1623914816625; Thu, 17 Jun 2021 00:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623914816; cv=none; d=google.com; s=arc-20160816; b=VtCf9RwTZD/s9Fits1YmTSYXQ3gCQHfg/Ff22RblOxbTzfb6LcBbD2uVxpzRKbeXec 8NKYJwIPb2QmEJT3FR+EkzHbZRYkcZffPSaipip5Xwa/aDJJ3XdHy4XQdTPUwnCW833I 9RYaRP5m2bHDPcB6NmGCocsKQtyBuO4NH3q/gwAzV8T8XP36cz13M7coIlLwblgWORuH Yk4Z/a25Ivou3Ohjy1bVdaGu4GXiTJcWoO4UVUZnwe7R+bxbDUjnuenn+5uU6CB87gLh JDHZSGzBNAlU3X41NqYbG8zKMv2sYac6RTJpcUvBsKWGe4AQdnLOVKIqXmgZOqdZZ7ak sbVA== 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=zuMKieSKmxG8G6e6NnP+NFsUXpSpwVQagRUZS8Xpj8k=; b=F/W5k8IwmaWdvIVluI3tXeFkM589AUKnvzxSewjhIk+oklEWhpZLQQFXPMMU2xWOOg yIzCvhhLukHC9QHqMUMqGxDJ/D4w8G1ZqgeHe3msOj2yuPzlwmfCziNYBh124Ug/nFPs t9bzIrgpFTTeceoiZpAGc/JPcOFLRlSLd+RVqcMyLM6eeQq1rndJ58cF1vt9RHIwOYPO KAailHZoS3DCZXCgC4d3micjRAMakAdZojbkxRsEQnfxbNmB8kX9mc2AVYhEohtz5Jqt o0GU4V1v/BnET4O3q8Ym2JHoUEhgkelzUN4sUh+S99HCSV/LG28so+IUsEymB602xvqu 5g1Q== 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 n5si4533315edr.505.2021.06.17.00.26.33; Thu, 17 Jun 2021 00:26:56 -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 S230055AbhFQH1o (ORCPT + 99 others); Thu, 17 Jun 2021 03:27:44 -0400 Received: from mail-vk1-f179.google.com ([209.85.221.179]:37871 "EHLO mail-vk1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbhFQH1o (ORCPT ); Thu, 17 Jun 2021 03:27:44 -0400 Received: by mail-vk1-f179.google.com with SMTP id l194so170072vkl.4; Thu, 17 Jun 2021 00:25:37 -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=zuMKieSKmxG8G6e6NnP+NFsUXpSpwVQagRUZS8Xpj8k=; b=I9uHIsCd6ondXROIgg49yhGYOV2GftdPVe6DTFuRw8UcuxxmFCOKDPobFWMPXLQG4q 2Yzs+VwMS3pKGm1bwAanoWgMJs7p0g4kZBKF7Rq8o7MuAuYmyXd2OKFpQVG+IKPLbFf4 kve/Ordw8ewvuXr3YxYZrNTZ4+7y1lzm/2fwt/ZUvDGzh2RXzdZOqS/HGOmANJ3U7gRP CojbMmacP6jAbCnW/rFwfWqqIY1tfTkCn3MhrUSlMUeOHRDVIOl1LDdM5CF/BV2y4pWu bHOV1GMwYByfc8dluLZA+MQu9Qnyt/NxFgyHwun+IBYvBq0KPVXusCrm5tBGdtVuVNFQ Mbtg== X-Gm-Message-State: AOAM531imwkhloaIumr7/xOmhmhmm/YFYKKc6JdZmAkw26/zwV54Rnh5 ZjGovSr7it71hGH3yRgzsUyAz3UR95OocNukyGPYRxO6/Ww= X-Received: by 2002:a1f:9505:: with SMTP id x5mr2913477vkd.6.1623914736731; Thu, 17 Jun 2021 00:25:36 -0700 (PDT) MIME-Version: 1.0 References: <1623896524-102058-1-git-send-email-yang.lee@linux.alibaba.com> In-Reply-To: <1623896524-102058-1-git-send-email-yang.lee@linux.alibaba.com> From: Geert Uytterhoeven Date: Thu, 17 Jun 2021 09:25:25 +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 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. > > parent_name = __clk_get_name(parent); 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