[alsa-devel] [patch] ASoC: sun4i-i2s: remove some dead code
Maxime Ripard
maxime.ripard at free-electrons.com
Wed Feb 8 09:58:41 CET 2017
On Tue, Feb 07, 2017 at 04:50:08PM +0300, Dan Carpenter wrote:
> On Tue, Feb 07, 2017 at 02:42:15PM +0100, Maxime Ripard wrote:
> > > - if (!IS_ERR(i2s->rst)) {
> > > - ret = reset_control_deassert(i2s->rst);
> > > - if (ret) {
> > > - dev_err(&pdev->dev,
> > > - "Failed to deassert the reset control\n");
> > > - return -EINVAL;
> > > - }
> > > + ret = reset_control_deassert(i2s->rst);
> > > + if (ret) {
> > > + dev_err(&pdev->dev,
> > > + "Failed to deassert the reset control\n");
> > > + return -EINVAL;
> >
> > In the case where has_reset is false, rst is NULL and will trigger a
> > WARN_ON in reset_control_deassert.
> >
>
> No it won't. reset_control_deassert(NULL) just returns success
> immediately.
Not in current Linus' tree at least:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/reset/core.c#n217
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20170208/3b3cc1d9/attachment.sig>
More information about the Alsa-devel
mailing list