Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c15cc498 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Greg Kroah-Hartman
Browse files

Staging: rtl8723au: Remove print statements and debug messages



The  memory allocation functions generates a call stack containing
all the context information on failure, so print statements and debug
messages can be removed on failure of these functions. Also remove
unwanted {} around if block after removal of these messages.
Done using coccinelle:

@@
expression e;
@@

e=\(kmalloc\|kmalloc\|kmalloc_array\|alloc_netdev\|kzalloc\|
   devm_kzalloc\|devm_ioremap\)(...);
...
if(!e){
- \(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...);
...when any
}

Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b32f6fdc
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -256,12 +256,8 @@ static void usb_read_interrupt_complete(struct urb *purb)
				c2w = kmalloc(sizeof(struct evt_work),
						GFP_ATOMIC);

				if (!c2w) {
					printk(KERN_WARNING "%s: unable to "
					       "allocate work buffer\n",
					       __func__);
				if (!c2w)
					goto urb_submit;
				}

				c2w->adapter = padapter;
				INIT_WORK(&c2w->work, rtw_evt_work);
+0 −3
Original line number Diff line number Diff line
@@ -2610,8 +2610,6 @@ static int rtw_cfg80211_add_monitor_if(struct rtw_adapter *padapter, char *name,
	/*  wdev */
	mon_wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
	if (!mon_wdev) {
		DBG_8723A("%s(%s): allocate mon_wdev fail\n", __func__,
			  padapter->pnetdev->name);
		ret = -ENOMEM;
		goto out;
	}
@@ -3262,7 +3260,6 @@ int rtw_wdev_alloc(struct rtw_adapter *padapter, struct device *dev)
	/*  wdev */
	wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
	if (!wdev) {
		DBG_8723A("Couldn't allocate wireless device\n");
		ret = -ENOMEM;
		goto free_wiphy;
	}