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

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

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

2025-04-04 Thread henry martin
Noted, thanks for the feedback! I’ll send subsequent versions as independent patches in the future. Best regards, Henry Lee Jones 于2025年4月4日周五 23:13写道: > > On Fri, 04 Apr 2025, Lee Jones wrote: > > > On Tue, 01 Apr 2025 17:16:47 +0800, Henry Martin wrote: > > > devm_kasprintf() returns NULL whe

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

2025-04-04 Thread Lee Jones
On Fri, 04 Apr 2025, Lee Jones wrote: > On Tue, 01 Apr 2025 17:16:47 +0800, Henry Martin wrote: > > devm_kasprintf() returns NULL when memory allocation fails. Currently, > > wled_configure() does not check for this case, which results in a NULL > > pointer dereference. > > > > Add NULL check aft

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

2025-04-04 Thread Lee Jones
On Tue, 01 Apr 2025 17:16:47 +0800, Henry Martin wrote: > devm_kasprintf() returns NULL when memory allocation fails. Currently, > wled_configure() does not check for this case, which results in a NULL > pointer dereference. > > Add NULL check after devm_kasprintf() to prevent this issue. > > >