[PATCH v2] backlight: pm8941: Add NULL check in wled_configure()

2025-04-05 Thread Henry Martin
devm_kasprintf() return NULL if memory allocation fails. Currently, wled_configure() does not check for this case, leading to a possible NULL pointer dereference. Add NULL check after devm_kasprintf() to prevent this issue. Fixes: f86b77583d88 ("backlight: pm8941: Convert to using %pOFn instead o

Re: [PATCH v2] backlight: pm8941: Add NULL check in wled_configure()

2025-03-31 Thread Dmitry Baryshkov
On Mon, Mar 31, 2025 at 10:16:54PM +0800, Henry Martin wrote: > devm_kasprintf() return NULL if memory allocation fails. Currently, > wled_configure() does not check for this case, leading to a possible NULL > pointer dereference. > > Add NULL check after devm_kasprintf() to prevent this issue. >

Re: [PATCH v2] backlight: pm8941: Add NULL check in wled_configure()

2025-03-31 Thread Markus Elfring
> devm_kasprintf() return NULL if memory allocation fails. Currently, call? failed? > wled_configure() does not check for this case, leading to a possible NULL > pointer dereference. You may omit the word “possible” in such a change description. (W