Category: Linux

char: tpm: Deletion of unnecessary checks before the function call “tpm_dev_vendor_release”

Author: Markus Elfring <elfring@users.sourceforge.net> The tpm_dev_vendor_release() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Peter Huewe — drivers/char/tpm/tpm_i2c_atmel.c | 3 +– drivers/char/tpm/tpm_i2c_nuvoton.c | 3 +– 2 files changed, 2 insertions(+), …

Continue reading

drbd: Deletion of an unnecessary check before the function call “lc_destroy”

Author: Markus Elfring <elfring@users.sourceforge.net> The lc_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Roland Kammerer Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe — drivers/block/drbd/drbd_nl.c | 3 +– …

Continue reading

firmware class: Deletion of an unnecessary check before the function call “vunmap”

Author: Markus Elfring <elfring@users.sourceforge.net> The vunmap() function performes also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Greg Kroah-Hartman — drivers/base/firmware_class.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 9962744..58470c3 …

Continue reading

netlink: Deletion of an unnecessary check before the function call “__module_get”

Author: Markus Elfring <elfring@users.sourceforge.net> The __module_get() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller — net/netlink/af_netlink.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   …

Continue reading

netfilter: Deletion of unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The functions free_percpu() and module_put() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso — net/netfilter/ipvs/ip_vs_ctl.c | 3 +– …

Continue reading

net: pktgen: Deletion of an unnecessary check before the function call “proc_remove”

Author: Markus Elfring <elfring@users.sourceforge.net> The proc_remove() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller — net/core/pktgen.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   …

Continue reading

PCI: layerscape: Fix platform_no_drv_owner.cocci warnings

Author: Julia Lawall <julia.lawall@lip6.fr> No need to set .owner here. The core will do it. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Julia Lawall Signed-off-by: Bjorn Helgaas — drivers/pci/host/pci-layerscape.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index 6697b1a..68c9e5e 100644 — a/drivers/pci/host/pci-layerscape.c +++ b/drivers/pci/host/pci-layerscape.c @@ -167,7 +167,6 @@ MODULE_DEVICE_TABLE(of, ls_pcie_of_match); static struct platform_driver …

Continue reading

udf: Deletion of unnecessary checks before the function call “iput”

Author: Markus Elfring <elfring@users.sourceforge.net> The iput() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Jan Kara — fs/udf/super.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   diff …

Continue reading

NFS: Deletion of unnecessary checks before the function call “nfs_put_client”

Author: Markus Elfring <elfring@users.sourceforge.net> The nfs_put_client() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Trond Myklebust — fs/nfs/filelayout/filelayoutdev.c | 3 +– fs/nfs/nfs4client.c | 15 +++++———- 2 files changed, 6 insertions(+), …

Continue reading

GFS2: Deletion of unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The functions iput() and put_pid() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Steven Whitehouse — fs/gfs2/glock.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) …

Continue reading