Staging: wilc1000: Unnecessary 'out of memory' message
PATCH v3 1/1 Staging: wilc1000: Unnecessary 'out of memory' message
This patch fixes checkpatch.pl warning in file host_interface.c WARNING : possible unecessary 'out of memory' message.
Signed-off-by Mihaela Muraru <[email protected]>
---
Changes in v3:
- change the description.
- correct spelling mistakes.
--- drivers/staging/wilc1000/host_interface.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -6
@@ -1722,10 +1722,8 @@ _WPAPtk_end_case_:case PMKSA : pu8keybuf =kmalloc ((pstrHostIFkeyAttr->attr.pmkid.numpmkid *PMKSA_KEY_LEN ) +1 ,GFP_KERNEL ); -if (!pu8keybuf) { -netdev_err (vif->ndev,"No buffer to send PMKSA Key\n" ); +if (!pu8keybuf)return -ENOMEM ; - } pu8keybuf[0 ] = pstrHostIFkeyAttr->attr.pmkid.numpmkid;
@@ -2322,10 +2320,8 @@ static u32 Handle_ListenStateExpired(struct wilc_vif *vif, wid.size =2 ; wid.val =kmalloc (wid.size,GFP_KERNEL ); -if (!wid.val) { -netdev_err (vif->ndev,"Failed to allocate memory\n" ); +if (!wid.val)return -ENOMEM ; - } wid.val[0 ] = u8remain_on_chan_flag; wid.val[1 ] =FALSE_FRMWR_CHANNEL ;
Signature · 1 line
2.7.4