Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Aug 2014 14:55:39 +0000 (UTC)
From:      Jean-Sebastien Pedron <dumbbell@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269779 - head/sys/dev/fb
Message-ID:  <53e787eb.247f.4de6e89f@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Sun Aug 10 14:55:39 2014
New Revision: 269779
URL: http://svnweb.freebsd.org/changeset/base/269779

Log:
  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

Modified:
  head/sys/dev/fb/fbd.c

Modified: head/sys/dev/fb/fbd.c
==============================================================================
--- head/sys/dev/fb/fbd.c	Sun Aug 10 08:35:42 2014	(r269778)
+++ head/sys/dev/fb/fbd.c	Sun Aug 10 14:55:39 2014	(r269779)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e787eb.247f.4de6e89f>