summaryrefslogtreecommitdiffstats
path: root/sys/dev/fb/fbd.c
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2014-08-10 14:55:39 +0000
committerdumbbell <dumbbell@FreeBSD.org>2014-08-10 14:55:39 +0000
commit49b200df0d501c005ee9f0906e576ede38a9bdee (patch)
tree4c2e43a5a8a8c7ae07331e171d71feb8f9c92796 /sys/dev/fb/fbd.c
parent5d48d93213025736fc1f3f4042b6b3e6487bbe6f (diff)
downloadFreeBSD-src-49b200df0d501c005ee9f0906e576ede38a9bdee.zip
FreeBSD-src-49b200df0d501c005ee9f0906e576ede38a9bdee.tar.gz
fbd: Fix a bug where vt_fb_attach() success would be considered a failure
vt_fb_attach() currently always returns 0, but it could return a code defined in errno.h. However, it doesn't return a CN_* code. So checking its return value against CN_DEAD (which is 0) is incorrect, and in this case, a success becomes a failure. The consequence was unimportant, because the caller (drm_fb_helper.c) would only log an error message in this case. The console would still work. Approved by: nwhitehorn
Diffstat (limited to 'sys/dev/fb/fbd.c')
-rw-r--r--sys/dev/fb/fbd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/fb/fbd.c b/sys/dev/fb/fbd.c
index 8c6b036..ff2488d 100644
--- a/sys/dev/fb/fbd.c
+++ b/sys/dev/fb/fbd.c
@@ -246,8 +246,9 @@ fbd_register(struct fb_info* info)
return (err);
if (first) {
- if (vt_fb_attach(info) == CN_DEAD)
- return (ENXIO);
+ err = vt_fb_attach(info);
+ if (err)
+ return (err);
}
return (0);
OpenPOWER on IntegriCloud