[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsirHLneY1FiOStJ@black.fi.intel.com>
Date: Fri, 23 Aug 2024 18:30:36 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Rong Qianfeng <rongqianfeng@...o.com>
Cc: biju.das.jz@...renesas.com,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Andi Shyti <andi.shyti@...nel.org>,
Paul Cercueil <paul@...pouillou.net>,
linux-renesas-soc@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
opensource.kernel@...o.com
Subject: Re: [PATCH v3 1/4] i2c: emev2: Use devm_clk_get_enabled() helpers
On Fri, Aug 23, 2024 at 11:51:13AM +0800, Rong Qianfeng wrote:
> The devm_clk_get_enabled() helpers:
> - call devm_clk_get()
> - call clk_prepare_enable() and register what is needed in order to
> call clk_disable_unprepare() when needed, as a managed resource.
>
> This simplifies the code and avoids the calls to clk_disable_unprepare().
...
> ret = platform_get_irq(pdev, 0);
> if (ret < 0)
> - goto err_clk;
> + return ret;
> priv->irq = ret;
(1)
> ret = devm_request_irq(&pdev->dev, priv->irq, em_i2c_irq_handler, 0,
> "em_i2c", priv);
> if (ret)
> - goto err_clk;
> + return ret;
>
> ret = i2c_add_adapter(&priv->adap);
>
While at it, you may move this blank line to (1) above.
> if (ret)
> - goto err_clk;
> + return ret;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists