[PATCH v2 1/2] mtd: nand: orion: fix clk handling

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Mar 29 12:39:03 PDT 2017


On Wed, Mar 29, 2017 at 09:36:08PM +0200, Simon Baatz wrote:
> On Mon, Mar 27, 2017 at 08:19:49PM +0200, Uwe Kleine-König wrote:
> > you could to the following here instead:
> > 
> > 	info->clk = devm_clk_get(&pdev->dev, NULL);
> > 	if (IS_ERR(info->clk))
> > 		/*
> > 		 * We ignore all errors here, that's wrong but only for
> > 		 * one commit.
> > 		 */
> > 		info->clk = NULL;
> > 
> > 	ret = clk_prepare_enable(info->clk);
> > 	if (ret) ...
> > 
> 
> Makes sense.  I don't think we should have such a comment, though. 

Yes I agree, I just wanted to prevent people thinking I suggest this
code snipet for optional clock handling and so wanted to write a big
No-No-No onto it.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the linux-mtd mailing list