Re: [PATCH] iio: adc: ti-ads1298: Add NULL check in ads1298_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 18 Nov 2024 11:08:47 +0100
Markus Elfring <Markus.Elfring@xxxxxx> wrote:

> > devm_kasprintf() can return a NULL pointer on failure,but this
> > returned value in ads1298_init() is not checked.
> > Add NULL check in ads1298_init(), to handle kernel NULL
> > pointer dereference error.  
> 
> Another wording suggestion:
> A devm_kasprintf() call can return a null pointer on failure.
> But such a return value was not checked in this function implementation.
> Thus add a corresponding check so that a null pointer dereference
> will be avoided.
> 
> 
> Regards,
> Markus

I tweaked it to slightly shorter form.

Applied and marked for stable.

Thanks,

Jonathan




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux