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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Feb 2013 05:01:48 +0100
From:	Cyril Roelandt <tipecaml@...il.com>
To:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Cc:	Cyril Roelandt <tipecaml@...il.com>
Subject: [PATCH 0/5] Remove redundant NULL checks.

Remove redundant NULL checks before calls to functions that are equivalent to a
no-op when run on a NULL pointer.

These patches were generated by the following semantic patch, and manually
reviewed:

<smpl>
@r@
identifier noop_func;
identifier param;
type T;
@@
noop_func (T *param) {
	...
	if (!param) return;
	...
}

@@
identifier r.noop_func;
expression E;
statement S;
@@
(
- if (E) noop_func(E);
+ noop_func(E);
|
- if (E) { noop_func(E); E = NULL; }
+ noop_func(E);
+ E = NULL;
)
</smpl>

Regards,
Cyril Roelandt
---

Cyril Roelandt (5):
  radeon: Remove redundant NULL check before radeon_i2c_destroy().
  iommu: remove redundant NULL check before dma_ops_domain_free().
  staging: dgrp: remove redundant NULL check before
    unregister_dgrp_device().
  staging: tidspbridge: remove redundant NULL check before
    delete_msg_mgr().
  xen: remove redundant NULL check before unregister_and_remove_pcpu().

 drivers/gpu/drm/radeon/radeon_i2c.c       |    6 ++----
 drivers/iommu/amd_iommu.c                 |    3 +--
 drivers/staging/dgrp/dgrp_specproc.c      |    9 +++------
 drivers/staging/tidspbridge/core/msg_sm.c |    3 +--
 drivers/xen/pcpu.c                        |    3 +--
 5 files changed, 8 insertions(+), 16 deletions(-)

-- 
1.7.10.4

--
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