lkml.org 
[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] net: ethernet: ti: cpdma: correct error handling for chan create
On Wed, Dec 06, 2017 at 04:38:14PM -0500, David Miller wrote:
> From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
> Date: Wed, 6 Dec 2017 16:54:09 +0200
>
> > @@ -3065,10 +3065,16 @@ static int cpsw_probe(struct platform_device *pdev)
> > }
> >
> > cpsw->txv[0].ch = cpdma_chan_create(cpsw->dma, 0, cpsw_tx_handler, 0);
> > + if (WARN_ON(IS_ERR(cpsw->txv[0].ch))) {
> > + dev_err(priv->dev, "error initializing tx dma channel\n");
> > + ret = PTR_ERR(cpsw->txv[0].ch);
> > + goto clean_dma_ret;
> > + }
> > +
>
> You're already emitting a proper dev_err() message, therefore WARN_ON()
> is a duplicate notification to the logs and therefore not appropriate.

Yes, will remove unneeded WARNs

--
Regards,
Ivan Khoronzhuk

\
 
 \ /
  Last update: 2017-12-07 20:57    [W:0.081 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site