diff options
| author | Jeroen Hofstee <[email protected]> | 2014-06-11 23:12:28 +0200 |
|---|---|---|
| committer | Tom Warren <[email protected]> | 2014-06-19 09:18:05 -0700 |
| commit | c42ff090e41d4b9e50faa727bac490ee790f82f4 (patch) | |
| tree | 3635d1f0f333229ba6fbaa87281f7e2e86777a66 | |
| parent | 0a26e1d6c394aacbf1153977b7348d1dff85db3f (diff) | |
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 <[email protected]>
Signed-off-by: Jeroen Hofstee <[email protected]>
Tested-by: Stephen Warren <[email protected]>
Signed-off-by: Tom Warren <[email protected]>
| -rw-r--r-- | arch/arm/cpu/armv7/tegra20/display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/tegra20/display.c b/arch/arm/cpu/armv7/tegra20/display.c index 488f0c639dd..fd77f3f0eff 100644 --- a/arch/arm/cpu/armv7/tegra20/display.c +++ b/arch/arm/cpu/armv7/tegra20/display.c @@ -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; } |
