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] [day] [month] [year] [list]
Date:   Thu, 9 Mar 2017 17:46:19 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     simran singhal <singhalsimran0@...il.com>
Cc:     Larry.Finger@...inger.net, devel@...verdev.osuosl.org,
        florian.c.schilhabel@...glemail.com,
        outreachy-kernel@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: media: Clean up tests if NULL returned on
 failure

On Sat, Mar 04, 2017 at 12:25:18AM +0530, simran singhal wrote:
> Some functions like kmalloc/kzalloc return NULL on failure.
> When NULL represents failure, !x is commonly used.
> 
> This was done using Coccinelle:
> @@
> expression *e;
> identifier l1;
> @@
> 
> e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
> ...
> - e == NULL
> + !e
> 
> Signed-off-by: simran singhal <singhalsimran0@...il.com>
> ---
>  drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 2 +-
>  drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c      | 4 ++--
>  drivers/staging/media/lirc/lirc_zilog.c                   | 6 +++---
>  3 files changed, 6 insertions(+), 6 deletions(-)

Please break this up into one patch per driver.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ