Staging: rtl8192e: rtllib_softmac: Do not print message if kzalloc() failed.
PATCH v2 1/1 Staging: rtl8192e: rtllib_softmac: Do not print message if kzalloc() failed.
As kzalloc() has its own messges, so no need of error messsge after kzalloc() failed . Also removing the NULL test whose purpose is to print the error message only and not returning any error.
---
Changes in v2:
* No change.
*Compile this patch to check nothing is broken.
drivers/staging/rtl8192e/rtllib_softmac.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8192e/rtllib_softmac.c +0 -2
@@ -2980,8 +2980,6 @@ void rtllib_softmac_init(struct rtllib_device *ieee)for (i =0 ; i <5 ; i++) ieee->seq_ctrl[i] =0 ; ieee->pDot11dInfo =kzalloc (sizeof (struct rt_dot11d_info ),GFP_ATOMIC ); -if (!ieee->pDot11dInfo) -netdev_err (ieee->dev,"Can't alloc memory for DOT11D\n" ); ieee->LinkDetectInfo.SlotIndex =0 ; ieee->LinkDetectInfo.SlotNum =2 ; ieee->LinkDetectInfo.NumRecvBcnInPeriod =0 ;
Signature · 1 line
1.8.3.4
Greg KH
maintainerQuoted 1 line · Sandhya Bankar
As
kzalloc()has its own messges, so no need of error messsge afterkzalloc()failed . Also removing the NULL test whose purpose is to print the error message only and not returning any error.
Please wrap this changelog entry :(
Quoted 15 lines
Signed-off-by Sandhya Bankar <[email protected]>---
Changes in v2:
* No change.
*Compile this patch to check nothing is broken.drivers/staging/rtl8192e/rtllib_softmac.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/rtl8192e/rtllib_softmac.c +0
-0
drivers/staging/rtl8192e/rtllib_softmac.c void rtllib_softmac_init(struct rtllib_device *ieee) · line 2984
Quoted 5 lines
drivers/staging/rtl8192e/rtllib_softmac.c +0
-2@@ -2980,8 +2980,6 @@ void rtllib_softmac_init(struct rtllib_device *ieee)for (i =0 ; i <5 ; i++) ieee->seq_ctrl[i] =0 ; ieee->pDot11dInfo =kzalloc (sizeof (struct rt_dot11d_info ),GFP_ATOMIC ); -if (!ieee->pDot11dInfo) -netdev_err (ieee->dev,"Can't alloc memory for DOT11D\n" );
Don't you think some error should happen here? We can't just continue on like nothing happened...
thanks,
greg k-h