Messages in this thread | | | Date | Wed, 10 Aug 2011 00:37:54 +0800 | Subject | Re: [PATCH] gianfar: reduce stack usage in gianfar_ethtool.c | From | Wang Shaoyan <> |
| |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |