[lkml]   [2018]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] iio: adc: meson-saradc: check for devm_kasprintf failure
On Thu, Nov 22, 2018 at 8:52 AM Nicholas Mc Guire <> wrote:
> devm_kasprintf() may return NULL on failure of internal allocation thus
> the assignments to are not safe if not checked. On error
> meson_sar_adc_clk_init() returns negative values so -ENOMEM in the
> (unlikely) failure case of devm_kasprintf() should be fine here.
> Signed-off-by: Nicholas Mc Guire <>
> Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs")
Acked-by: Martin Blumenstingl <>

thank you for the patch!
I tested the non-error case on my Odroid-C1 and it still works fine.


 \ /
  Last update: 2018-11-22 22:46    [W:0.038 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site