[media] drivers/media/platform/mx2_emmaprp.c: adjust inconsistent IS_ERR and PTR_ERR

Author: Julia Lawall <Julia.Lawall@lip6.fr> Change the call to IS_ERR to test the value that was just initialized and is returned using PTR_ERR. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,e1; @@ ( if (IS_ERR(e)) { … PTR_ERR(e) … } | if (IS_ERR(e=e1)) { … PTR_ERR(e) … } | …

Continue reading

staging: csr: use is_zero_ether_addr() instead of memcmp()

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/staging/csr/sme_wext.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   diff –git a/drivers/staging/csr/sme_wext.c b/drivers/staging/csr/sme_wext.c …

Continue reading

[SCSI] megaraid_sas: combine kmalloc+memset into kzalloc

Author: Fengguang Wu <fengguang.wu@intel.com> Use kzalloc rather than kmalloc followed by memset with 0. Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Signed-off-by: Fengguang Wu Acked-by: Adam Radford Signed-off-by: James Bottomley — drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 ++—– 1 file changed, 2 insertions(+), 5 deletions(-)   diff –git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 788115b..ddf094e 100644 — a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -462,8 +462,8 @@ megasas_alloc_cmds_fusion(struct …

Continue reading

staging: r8712u: rtl871x_mlme.c: use is_zero_ether_addr() instead of memcmp()

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/rtl871x_mlme.c | 5 +++– 1 file changed, 3 insertions(+), 2 deletions(-)   diff …

Continue reading

mwifiex: use is_zero_ether_addr() instead of memcmp()

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Acked-by: Bing Zhao Signed-off-by: John W. Linville — drivers/net/wireless/mwifiex/sta_cmdresp.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   …

Continue reading

twl4030_charger: Use IRQF_ONESHOT

Author: Fengguang Wu <fengguang.wu@intel.com> Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT Signed-off-by: Fengguang Wu Acked-by: Felipe Balbi Signed-off-by: Anton Vorontsov — drivers/power/twl4030_charger.c | 5 +++– 1 file changed, 3 insertions(+), 2 deletions(-)   diff –git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c index 8d6bc68..f9e70cf 100644 — a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c @@ -534,7 …

Continue reading

lp8727_charger: Use IRQF_ONESHOT

Author: Fengguang Wu <fengguang.wu@intel.com> Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT Signed-off-by: Fengguang Wu Acked-by: Milo(Woogyom) Kim Signed-off-by: Anton Vorontsov — drivers/power/lp8727_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/power/lp8727_charger.c …

Continue reading

staging: rtl8192e: use is_zero_ether_addr() instead of memcmp()

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtllib_softmac_wx.c | 7 ++++— 1 file changed, 4 insertions(+), 3 deletions(-)   diff –git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c …

Continue reading

Staging: rtl8192u: use is_zero_ether_addr() instead of memcmp()

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 5 +++– 1 file changed, 3 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c …

Continue reading

Staging: rtl8187se: use is_zero_ether_addr() instead of memcmp()

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c | 5 +++– 1 file changed, 3 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c …

Continue reading