Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1698472
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] staging: ccree: Replace kzalloc with devm_kzalloc |
| Date | 2017-07-28 07:00 +0200 |
| Message-ID | <u85xv-7vg-7@gated-at.bofh.it> (permalink) |
| References | <u7RXz-7d4-5@gated-at.bofh.it> <u7RXz-7d4-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jul 27, 2017 at 05:27:32PM +0300, Gilad Ben-Yossef wrote: > From: Suniel Mahesh <sunil.m@techveda.org> > > It is recommended to use managed function devm_kzalloc, which > simplifies driver cleanup paths and driver code. > This patch does the following: > (a) replace kzalloc with devm_kzalloc. > (b) drop kfree(), because memory allocated with devm_kzalloc() is > automatically freed on driver detach, otherwise it leads to a double > free. > (c) remove unnecessary blank lines. > > Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> > [gby: rebase on top of latest coding style fixes changes] > Acked-by: Gilad Ben-Yossef <gilad@benyossef.com> None of these 3 applied to my tree :(
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/3] staging: ccree: Replace kzalloc with devm_kzalloc Gilad Ben-Yossef <gilad@benyossef.com> - 2017-07-27 16:30 +0200 Re: [PATCH 1/3] staging: ccree: Replace kzalloc with devm_kzalloc Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-28 07:00 +0200
csiph-web