lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BM1PR0101MB14445D157BF6CF2BCC908BDBE6350@BM1PR0101MB1444.INDPRD01.PROD.OUTLOOK.COM>
Date:   Wed, 13 Dec 2017 09:40:14 +0000
From:   Dhaval Shah <dhaval.shah@...tnautics.com>
To:     Pali Rohár <pali.rohar@...il.com>
CC:     "dvhart@...radead.org" <dvhart@...radead.org>,
        "andy@...radead.org" <andy@...radead.org>,
        "platform-driver-x86@...r.kernel.org" 
        <platform-driver-x86@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/x86: dell-smo8800: Possible unnecessary 'out of
 memory' message

Hi Pali Rohar,

Thanks for the review.

________________________________________
> From: Pali Rohár <pali.rohar@...il.com>
> Sent: Wednesday, December 13, 2017 2:00 PM
> To: Dhaval Shah
> Cc: dvhart@...radead.org; andy@...radead.org; platform-driver-x86@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] platform/x86: dell-smo8800: Possible unnecessary 'out of memory' message
> 
> On Wednesday 13 December 2017 13:53:54 Dhaval Shah wrote:
> > Removed Possible unnecessary 'out of memory' message checkpatch warnings.
> > Issue found by checkpatch.
> >
> > Signed-off-by: Dhaval Shah <dhaval.shah@...tnautics.com>
> > ---
> >  drivers/platform/x86/dell-smo8800.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/platform/x86/dell-smo8800.c b/drivers/platform/x86/dell-smo8800.c
> > index 1d87237bc731..9590d5e7c5ca 100644
> > --- a/drivers/platform/x86/dell-smo8800.c
> > +++ b/drivers/platform/x86/dell-smo8800.c
> > @@ -150,10 +150,8 @@ static int smo8800_add(struct acpi_device *device)
> >       struct smo8800_device *smo8800;
> >
> >       smo8800 = devm_kzalloc(&device->dev, sizeof(*smo8800), GFP_KERNEL);
> > -     if (!smo8800) {
> > -             dev_err(&device->dev, "failed to allocate device data\n");
> 
> Hi! Any particular reason for removing error message?
> 
When you give the -ENOMEM as error in return then this message info will be provided by the kernel subsystem. no need to give this printk and that's why checkpatch gives warning in this case.
> > +     if (!smo8800)
> >               return -ENOMEM;
> > -     }
> >
> >       smo8800->dev = &device->dev;
> >       smo8800->miscdev.minor = MISC_DYNAMIC_MINOR;

--
Pali Rohár
pali.rohar@...il.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ