[lkml]   [2019]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH] PM / devfreq: fix mem leak and missing check of return value in devfreq_add_device()
> 'devfreq' is malloced in devfreq_add_device() and should be freed in
> the error handling cases, otherwise it will cause memory leak.
> devm_kzalloc() could fail, so insert a check of its return value. And
> if it fails, returns -ENOMEM.
> Signed-off-by: Yangtao Li <>

Dear Yangtao,

Could you please make your patch without indentation style changes?

The label, "err_devfreq", would fit more if it's renamed "err_kzalloc".


 \ /
  Last update: 2019-01-21 08:18    [W:0.085 / U:14.536 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site