* [PATCH v2] Staging: wilc1000: Unnecessary 'out of memory' message
@ 2016-10-09 20:56 Mihaela Muraru
2016-10-10 4:56 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Mihaela Muraru @ 2016-10-09 20:56 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: outreachy-kernel, Aditya Shankar, Ganesh Krishna
Delete unnecessary 'out of memory' message , warning found by
cehckpatch.pl tool.
WARNING: Possible unnecessary 'out of memory' message.
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
---
Changes in v2:
-- delete the unnecessary braces.
---
drivers/staging/wilc1000/host_interface.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 78f5613..ff3d267 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -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;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] Staging: wilc1000: Unnecessary 'out of memory' message
2016-10-09 20:56 [PATCH v2] Staging: wilc1000: Unnecessary 'out of memory' message Mihaela Muraru
@ 2016-10-10 4:56 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2016-10-10 4:56 UTC (permalink / raw)
To: Mihaela Muraru
Cc: Greg Kroah-Hartman, outreachy-kernel, Aditya Shankar, Ganesh Krishna
On Sun, 9 Oct 2016, Mihaela Muraru wrote:
> Delete unnecessary 'out of memory' message , warning found by
> cehckpatch.pl tool.
You could fix the spelling of checkpatch also.
julia
>
> WARNING: Possible unnecessary 'out of memory' message.
>
> Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
>
> ---
> Changes in v2:
> -- delete the unnecessary braces.
> ---
> drivers/staging/wilc1000/host_interface.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 78f5613..ff3d267 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -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;
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20161009205605.GA3816%40domino-MS-16Y1.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-10 4:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-09 20:56 [PATCH v2] Staging: wilc1000: Unnecessary 'out of memory' message Mihaela Muraru
2016-10-10 4:56 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.