Category: Linux

ath10k: delete unnecessary checks before the function call “release_firmware”

Author: Markus Elfring <elfring@users.sourceforge.net> The release_firmware() 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: Kalle Valo — drivers/net/wireless/ath/ath10k/core.c | 8 ++++—- 1 file changed, 4 insertions(+), 4 deletions(-)   diff …

Continue reading

ath9k: Delete an unnecessary check before the function call “relay_close”

Author: Markus Elfring <elfring@users.sourceforge.net> The relay_close() 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: Kalle Valo — drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff …

Continue reading

udf: remove bool assignment to 0/1

Author: Fabian Frederick <fabf@skynet.be> Fix the following coccinelle warnings: fs/udf/inode.c:753:2-13: WARNING: Assignment of bool to 0/1 fs/udf/inode.c:795:2-13: WARNING: Assignment of bool to 0/1 Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara — fs/udf/inode.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/fs/udf/inode.c b/fs/udf/inode.c index 7b72b7d..a445d59 100644 — a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -750,7 …

Continue reading

cw1200: Delete an unnecessary check before the function call “release_firmware”

Author: Markus Elfring <elfring@users.sourceforge.net> The release_firmware() 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: Kalle Valo — drivers/net/wireless/cw1200/fwio.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading

net: ep93xx_eth: Delete unnecessary checks before the function call “kfree”

Author: Markus Elfring <elfring@users.sourceforge.net> The kfree() 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: H Hartley Sweeten Signed-off-by: David S. Miller — drivers/net/ethernet/cirrus/ep93xx_eth.c | 6 ++—- 1 file changed, 2 …

Continue reading

qlogic: Deletion of unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The functions kfree() and vfree() perform also input parameter validation. Thus the test around their calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller — drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 24 ++++++++————– …/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 3 +– 2 files changed, 9 insertions(+), 18 deletions(-) …

Continue reading

netxen: Delete an unnecessary check before the function call “kfree”

Author: Markus Elfring <elfring@users.sourceforge.net> The kfree() 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 — drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   …

Continue reading

net: fec: Delete unnecessary checks before the function call “kfree”

Author: Markus Elfring <elfring@users.sourceforge.net> The kfree() 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 — drivers/net/ethernet/freescale/fec_main.c | 7 ++—– 1 file changed, 2 insertions(+), 5 deletions(-)   …

Continue reading

myri10ge: Delete an unnecessary check before the function call “kfree”

Author: Markus Elfring <elfring@users.sourceforge.net> The kfree() 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 — drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   …

Continue reading

iommu/amd: Convert non-returned local variable to boolean when relevant

Author: Quentin Lambert <lambert.quentin@gmail.com> This patch was produced using Coccinelle. A simplified version of the semantic patch is: @r exists@ identifier f; local idexpression u8 x; identifier xname; @@ f(…) { …when any ( x@xname = 1; | x@xname = 0; ) …when any } @bad exists@ identifier r.f; local idexpression u8 r.x expression e1 …

Continue reading