From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161437AbcFGSfN (ORCPT ); Tue, 7 Jun 2016 14:35:13 -0400 Received: from guitar.tcltek.co.il ([192.115.133.116]:43441 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161331AbcFGSfM (ORCPT ); Tue, 7 Jun 2016 14:35:12 -0400 Date: Tue, 7 Jun 2016 21:35:05 +0300 From: Baruch Siach To: Peter Griffin Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kishon@ti.com, lee.jones@linaro.org, patches@linaro.org Subject: Re: [PATCH 1/2] phy: phy-qcom-ufs-qmp-14nm: Remove site specific OOM error message Message-ID: <20160607183505.GJ2425@tarshish> References: <1465321810-22470-1-git-send-email-peter.griffin@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465321810-22470-1-git-send-email-peter.griffin@linaro.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On Tue, Jun 07, 2016 at 06:50:09PM +0100, Peter Griffin wrote: > kzalloc will issue its own error message including a dump_stack() > so remote the site specific message. > > Signed-off-by: Peter Griffin > --- > drivers/phy/phy-qcom-ufs-qmp-14nm.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/phy/phy-qcom-ufs-qmp-14nm.c b/drivers/phy/phy-qcom-ufs-qmp-14nm.c > index 56631e7..958e9cc 100644 > --- a/drivers/phy/phy-qcom-ufs-qmp-14nm.c > +++ b/drivers/phy/phy-qcom-ufs-qmp-14nm.c > @@ -139,11 +139,9 @@ static int ufs_qcom_phy_qmp_14nm_probe(struct platform_device *pdev) > int err = 0; > > phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); > - if (!phy) { > - dev_err(dev, "%s: failed to allocate phy\n", __func__); > + if (!phy) > err = -ENOMEM; > goto out; > - } Are you sure? The 'goto' is now unconditional. > > generic_phy = ufs_qcom_phy_generic_probe(pdev, &phy->common_cfg, > &ufs_qcom_phy_qmp_14nm_phy_ops, &phy_14nm_ops); baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -