Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1529730pxj; Fri, 18 Jun 2021 09:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8BkQjdZHc8+djwpFWj5rSv7pARkhgWKu5pIanPPZpbeoruUyqpCWGIVuAy2PHY9p5Y7K7 X-Received: by 2002:a50:fd81:: with SMTP id o1mr5983606edt.382.1624032261939; Fri, 18 Jun 2021 09:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624032261; cv=none; d=google.com; s=arc-20160816; b=dQP/jvHQIkJ7/O9Phvti/N+sRkQ83+OQs5oPDX+H+cc/vQ0LZW/Zx/zlzO0mFUUVML lxPc2FjfF5GgFblFTYa1p7APJZuXYEzpV0x8lpZS4q/KdNIVtxvlsm3eCjV3Mz/3wQOS 4U6PxaGEWcOOLAQhUTaPFhHNHzrT6b+6Jfs3z4DfwsHf08I5/kFP/qY/6+cRr5Ee5tFv Z2UxkkyHIKKzIVjwxKe9pt7I+MvuieOG3tLukIt7+QbSCuAJR+2KnTkM2/jfQ/DSJkwE Vb8bxH/pcYFSWD0C75e6SJfcVwjRwJV0BqRZrUsE5KQsgfNurq6G3PaoshitvL3QxMx7 SdSg== 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=REVNzACq42gLwR5p2Aog6lzmFlHaKRfIiJ6QtzULbeg=; b=efkrbPakRu6M4Lz17CBnADDoAGlHGQLk3Q39WrLqZ+q4uAwJiB/QemdJ0+DnkWzrbX SSuE59x7Wf2iBlUmc1piYdkjxX98egT18qJeo2GSFIE4uP1H6P987vFoIa/58KYZkzI0 7vVfg+IZ0TM7StGxAPNYN1p2jxBieuQGDGVpeeLXWcpx4aulmIY2rXafbkpa2k4Hh/tH d0du4RFV0ybS7kwziAM159JBAvjgU6vjL7pQat0hcMrr2mH6aKhbban72Bd/agnWHYgs QFg8M7M2ProVsxLbXaOSUVKkkda6Nf7cC+RuVWCAaRNofMYdspi06kGhYEdHMrJL38P3 sGUQ== 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 t12si10437385edc.333.2021.06.18.09.03.49; Fri, 18 Jun 2021 09:04:21 -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 S232707AbhFRLnS (ORCPT + 99 others); Fri, 18 Jun 2021 07:43:18 -0400 Received: from mail-vs1-f44.google.com ([209.85.217.44]:44610 "EHLO mail-vs1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231819AbhFRLnR (ORCPT ); Fri, 18 Jun 2021 07:43:17 -0400 Received: by mail-vs1-f44.google.com with SMTP id x13so4763688vsf.11; Fri, 18 Jun 2021 04:41:07 -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=REVNzACq42gLwR5p2Aog6lzmFlHaKRfIiJ6QtzULbeg=; b=m/+zD4rwkIt2Mz1U7FFUTR1pJbCVYiPoIMVYVBoq9oMnQ7pDe3KUkH+SjxweSd720j GgKQYK4ZznYR7YRwMKuG2+5+ln8TNTFAzqWDwF8ihduVY9HTP/rE/20tbI2JSJGjVlm7 5BktoljpG8WG71l7990U2NkbIg2wAB8mylVAqkWfi87/IaQd5Zw3ueFZEywpOmU9G3pX SGW+4l0w0YkFLAOJY/OdrWpbcpVAlK2Fbi/Lyk7gU897Jnk/vdn3LLDSh9MvmAeCRcin 8ouxTEj5awqMALlaayrPH8BAibdY3+jA5vm/Bxci2gD5y1agSd8uukF6nd8GWACCEQrp kp0Q== X-Gm-Message-State: AOAM5332r1Zps5BmrGaKoiQrtzbtgh6VGpZyOkPgVz7pGV9V/j+/WRxP PXjrWR6cRQ5jJxN9V+mqCS5Vs+vT00kCaufkgKsEpRiOWKw= X-Received: by 2002:a67:7787:: with SMTP id s129mr1323024vsc.40.1624016466865; Fri, 18 Jun 2021 04:41:06 -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:40:55 +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 Fri, Jun 18, 2021 at 1:19 PM Geert Uytterhoeven wrote: > 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. Oops, that's only after Dan's patch. Reshuffling... 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