mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-01 08:33:31 +08:00
tegra20: display: fix checking of return value
The calling code seems a bit in doubt about the return value of fdtdec_lookup_phandle. Since it returns a negative value on error (and fdt_node_offset_by_phandle as well), check for that. cc: Wei Ni <wni@nvidia.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
parent
0a26e1d6c3
commit
c42ff090e4
@ -328,7 +328,7 @@ static int tegra_display_decode_config(const void *blob,
|
||||
rgb = fdt_subnode_offset(blob, node, "rgb");
|
||||
|
||||
config->panel_node = fdtdec_lookup_phandle(blob, rgb, "nvidia,panel");
|
||||
if (!config->panel_node < 0) {
|
||||
if (config->panel_node < 0) {
|
||||
debug("%s: Cannot find panel information\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user