lkml.org 
[lkml]   [2016]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [alsa-devel] [PATCH] ASoC: rt5659: Add mclk controls
From
Date
> +	/* Check if MCLK provided */
> + rt5659->mclk = devm_clk_get(&i2c->dev, "mclk");
> + if (IS_ERR(rt5659->mclk)) {
> + if (PTR_ERR(rt5659->mclk) == -EPROBE_DEFER)
> + return -EPROBE_DEFER;

The correct thing to do here is to check if != -ENOENT and then return
the error code. Otherwise you silently ignore errors if a clock was
specified, but there was an error requesting it.


\
 
 \ /
  Last update: 2016-07-28 23:21    [W:0.336 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site