Commit e12d3e1
backlight: pm8941: Add NULL check in wled_configure()
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: f86b775 ("backlight: pm8941: Convert to using %pOFn instead of device_node.name")
Signed-off-by: Henry Martin <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: "Daniel Thompson (RISCstar)" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lee Jones <[email protected]>1 parent d32a0b5 commit e12d3e1
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1406 | 1406 | | |
1407 | 1407 | | |
1408 | 1408 | | |
1409 | | - | |
| 1409 | + | |
1410 | 1410 | | |
1411 | | - | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
1412 | 1414 | | |
1413 | 1415 | | |
1414 | 1416 | | |
| |||
0 commit comments