Thread (5 messages) 5 messages, 3 authors, 2011-08-09

Re: [PATCH] gianfar: reduce stack usage in gianfar_ethtool.c

flat view

From: Wang Shaoyan <hidden>
Date: 2011-08-09 16:37:56
Also in: lkml

I thought kfree should not call, when kmalloc is failed. Now I think
is fine, thanks, it is much clearer
Perhaps it'd be clearer to use:

       local_rqfpr = kmalloc(...)
       local_rqfcr = kmalloc(...)
       if (!local_rqfpr || !local_rqfcr) {
               pr_err(...)
               ret = -ENOMEM;
               goto err;
       }

[...]

err:
       kfree(local_rqfpr);
       kfree(local_rqfcr);
       return ret;

Is the "local_" prefix useful?
It seems like visual noise to me.
They are some temporary variable, we better to left them


-- 
Wang Shaoyan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help