Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752430AbdLFViU (ORCPT ); Wed, 6 Dec 2017 16:38:20 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:55682 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbdLFViQ (ORCPT ); Wed, 6 Dec 2017 16:38:16 -0500 Date: Wed, 06 Dec 2017 16:38:14 -0500 (EST) Message-Id: <20171206.163814.2298864765495270615.davem@davemloft.net> To: ivan.khoronzhuk@linaro.org Cc: grygorii.strashko@ti.com, netdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: ethernet: ti: cpdma: correct error handling for chan create From: David Miller In-Reply-To: <1512572050-13442-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1512572050-13442-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 06 Dec 2017 13:38:16 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 577 Lines: 16 From: Ivan Khoronzhuk 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.