Skip to content
Commit 00257e0c authored by Rob Herring's avatar Rob Herring Committed by Bartlomiej Zolnierkiewicz
Browse files

fbdev: offb: Fix OF node name handling



Commit 5c63e407 ("fbdev: Convert to using %pOFn instead of
device_node.name") changed how the OF FB driver handles the OF node
name. This missed the case where the node name is passed to
offb_init_palette_hacks(). This results in a NULL ptr dereference
in strncmp and breaks any system except ones using bootx with no display
node.

Fix this by making offb_init_palette_hacks() use the OF node pointer and
use of_node_name_prefix() helper function instead for node name
comparisons. This helps in moving all OF node name accesses to helper
functions in preparation to remove struct device_node.name pointer.

Fixes: 5c63e407 ("fbdev: Convert to using %pOFn instead of device_node.name")
Reported-by: default avatarMathieu Malaterre <malat@debian.org>
Tested-by: default avatarMathieu Malaterre <malat@debian.org>
Cc: stable@vger.kernel.org # v4.19+
Cc: Elimar Riesebieter <riesebie@lxtec.de>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent a01421e4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment