summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib_module.c
diff options
context:
space:
mode:
authorQuentin Lambert <lambert.quentin@gmail.com>2015-03-05 14:12:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 16:59:53 -0800
commitb6b0012c2d410704782301299d36d311f9a39334 (patch)
treeb19683ce00be3ac69d46eea251f1121b3919afd5 /drivers/staging/rtl8192e/rtllib_module.c
parentd08c028c75e293598b9f3e2c8ad87fb43199298c (diff)
downloadop-kernel-dev-b6b0012c2d410704782301299d36d311f9a39334.zip
op-kernel-dev-b6b0012c2d410704782301299d36d311f9a39334.tar.gz
staging: rtl8192e: Remove unnecessary OOM message
This patch reduces the kernel size by removing error messages that duplicate the normal OOM message. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @@ identifier f,print,l; expression e; constant char[] c; @@ e = \(kzalloc\|kmalloc\|devm_kzalloc\|devm_kmalloc\)(...); if (e == NULL) { <+... - print(...,c,...); ... when any ( goto l; | return ...; ) ...+> } Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_module.c')
-rw-r--r--drivers/staging/rtl8192e/rtllib_module.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_module.c b/drivers/staging/rtl8192e/rtllib_module.c
index 248cc0d..32cc8df 100644
--- a/drivers/staging/rtl8192e/rtllib_module.c
+++ b/drivers/staging/rtl8192e/rtllib_module.c
@@ -72,11 +72,8 @@ static inline int rtllib_networks_allocate(struct rtllib_device *ieee)
ieee->networks = kzalloc(
MAX_NETWORK_COUNT * sizeof(struct rtllib_network),
GFP_KERNEL);
- if (!ieee->networks) {
- printk(KERN_WARNING "%s: Out of memory allocating beacons\n",
- ieee->dev->name);
+ if (!ieee->networks)
return -ENOMEM;
- }
return 0;
}
@@ -161,10 +158,9 @@ struct net_device *alloc_rtllib(int sizeof_priv)
rtllib_softmac_init(ieee);
ieee->pHTInfo = kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL);
- if (ieee->pHTInfo == NULL) {
- RTLLIB_DEBUG(RTLLIB_DL_ERR, "can't alloc memory for HTInfo\n");
+ if (ieee->pHTInfo == NULL)
return NULL;
- }
+
HTUpdateDefaultSetting(ieee);
HTInitializeHTInfo(ieee);
TSInitialize(ieee);
OpenPOWER on IntegriCloud