From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752041AbcGBT3W (ORCPT ); Sat, 2 Jul 2016 15:29:22 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:46407 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751328AbcGBT3U (ORCPT ); Sat, 2 Jul 2016 15:29:20 -0400 X-IronPort-AV: E=Sophos;i="5.26,564,1459807200"; d="scan'208";a="183585340" Date: Sat, 2 Jul 2016 21:29:16 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: SF Markus Elfring cc: Dmitry Torokhov , linux-input@vger.kernel.org, LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH 2/2] Input-at32psif: Remove OOM messages in psif_probe() In-Reply-To: <1c2a98cb-e853-7b4c-3c5b-1e3ee70c67fb@users.sourceforge.net> Message-ID: References: <566ABCD9.1060404@users.sourceforge.net> <4471604f-f401-bed9-39be-1aff2a92edf6@users.sourceforge.net> <1c2a98cb-e853-7b4c-3c5b-1e3ee70c67fb@users.sourceforge.net> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2 Jul 2016, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 2 Jul 2016 20:34:18 +0200 > > Delete two debug messages because Linux will usually provide > an appropriate information for a memory allocation failure. > > Signed-off-by: Markus Elfring > --- > drivers/input/serio/at32psif.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c > index fcb769a..b30503d 100644 > --- a/drivers/input/serio/at32psif.c > +++ b/drivers/input/serio/at32psif.c > @@ -210,15 +210,13 @@ static int __init psif_probe(struct platform_device *pdev) > int ret; > > psif = kzalloc(sizeof(struct psif), GFP_KERNEL); > - if (!psif) { > - dev_dbg(&pdev->dev, "out of memory\n"); > + if (!psif) > return -ENOMEM; > - } > + Why add a blank line here? > psif->pdev = pdev; > > io = kzalloc(sizeof(struct serio), GFP_KERNEL); > if (!io) { > - dev_dbg(&pdev->dev, "out of memory\n"); > ret = -ENOMEM; > goto out_free_psif; > } > -- > 2.9.0 > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Date: Sat, 02 Jul 2016 19:29:16 +0000 Subject: Re: [PATCH 2/2] Input-at32psif: Remove OOM messages in psif_probe() Message-Id: List-Id: References: <566ABCD9.1060404@users.sourceforge.net> <4471604f-f401-bed9-39be-1aff2a92edf6@users.sourceforge.net> <1c2a98cb-e853-7b4c-3c5b-1e3ee70c67fb@users.sourceforge.net> In-Reply-To: <1c2a98cb-e853-7b4c-3c5b-1e3ee70c67fb@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: SF Markus Elfring Cc: Dmitry Torokhov , linux-input@vger.kernel.org, LKML , kernel-janitors@vger.kernel.org On Sat, 2 Jul 2016, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 2 Jul 2016 20:34:18 +0200 > > Delete two debug messages because Linux will usually provide > an appropriate information for a memory allocation failure. > > Signed-off-by: Markus Elfring > --- > drivers/input/serio/at32psif.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c > index fcb769a..b30503d 100644 > --- a/drivers/input/serio/at32psif.c > +++ b/drivers/input/serio/at32psif.c > @@ -210,15 +210,13 @@ static int __init psif_probe(struct platform_device *pdev) > int ret; > > psif = kzalloc(sizeof(struct psif), GFP_KERNEL); > - if (!psif) { > - dev_dbg(&pdev->dev, "out of memory\n"); > + if (!psif) > return -ENOMEM; > - } > + Why add a blank line here? > psif->pdev = pdev; > > io = kzalloc(sizeof(struct serio), GFP_KERNEL); > if (!io) { > - dev_dbg(&pdev->dev, "out of memory\n"); > ret = -ENOMEM; > goto out_free_psif; > } > -- > 2.9.0 > >