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]
Date:   Fri, 25 Jan 2019 16:23:13 +0530
From:   Himanshu Jha <himanshujha199640@...il.com>
To:     Alexandru Ardelean <ardeleanalex@...il.com>
Cc:     Bharath Vedartham <linux.bhar@...il.com>, jic23@...nel.org,
        knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: iio: industrialio-core: add check when kzalloc
 fails

On Fri, Jan 25, 2019 at 08:55:27AM +0200, Alexandru Ardelean wrote:
> On Thu, Jan 24, 2019 at 4:28 PM Bharath Vedartham <linux.bhar@...il.com> wrote:
> >
> > add code to handle the case when kzalloc fails to allocate memory to dev
> >
> > Signed-off-by: Bharath Vedartham <linux.bhar@...il.com>
> > ---
> >  drivers/iio/industrialio-core.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> > index 4f5cd9f..93caa6b 100644
> > --- a/drivers/iio/industrialio-core.c
> > +++ b/drivers/iio/industrialio-core.c
> > @@ -1475,6 +1475,8 @@ struct iio_dev *iio_device_alloc(int sizeof_priv)
> >                 }
> >                 dev_set_name(&dev->dev, "iio:device%d", dev->id);
> >                 INIT_LIST_HEAD(&dev->buffer_list);
> > +       } else {
> > +               return NULL;
> 
> I'd argue that this is a bit redundant, because `dev` is NULL, the
> return below (return dev) will also return NULL.

+1

Also, subject title is incorrect.

Always use:

$ git log --oneline drivers/iio/industrialio-core.c

Use the most frequently tag/subject from the output of above
command.

"iio: core: ...." would be fine.


-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ