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: <alpine.LNX.2.00.1507091431470.10183@pobox.suse.cz>
Date:	Thu, 9 Jul 2015 14:34:13 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.com>
To:	SF Markus Elfring <elfring@...rs.sourceforge.net>
cc:	linux-input@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>,
	Benjamin Tissoires <benjamin.tissoires@...il.com>
Subject: Re: [PATCH] i2c-HID: Delete unnecessary checks before the function
 call "gpiod_put"

On Wed, 8 Jul 2015, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Wed, 8 Jul 2015 22:12:25 +0200
> 
> The gpiod_put() function performs also input parameter validation
> by forwarding its single input pointer to the gpiod_free() function.
> Thus the test around the calls is not needed.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>

As Dan correctly pointed out, this is not as straightforward as it might 
seem on a firsr sight, because there is a WARN_ON() that might start 
triggering in case of !ihid->desc.

Adding Benjamin. I am not applying this without his Ack.

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ