aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorBin Meng2015-10-01 00:36:00 -0700
committerSimon Glass2015-10-21 07:46:25 -0600
commitaf67e7ce237fa0956168efca7909458d4ea93d4b (patch)
tree49a358c6e390889c457200c6a678d266c52e546b /drivers/video
parentcdf9f085f209ba214178fe749133096721a208a6 (diff)
video: vesa_fb: Fix wrong return value check of pci_find_class()
When pci_find_class() fails to find a device, it returns -ENODEV. But now we check the return value against -1. Fix it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/vesa_fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/vesa_fb.c b/drivers/video/vesa_fb.c
index 4e6d070a5fe..a19651f5f3a 100644
--- a/drivers/video/vesa_fb.c
+++ b/drivers/video/vesa_fb.c
@@ -34,7 +34,7 @@ void *video_hw_init(void)
}
if (vbe_get_video_info(gdev)) {
dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, 0);
- if (dev == -1) {
+ if (dev < 0) {
printf("no card detected\n");
return NULL;
}