From owner-svn-src-all@FreeBSD.ORG Sun Aug 10 14:55:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46659BC7 for ; Sun, 10 Aug 2014 14:55:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D36E2B22 for ; Sun, 10 Aug 2014 14:55:40 +0000 (UTC) Received: from dumbbell (uid 1042) (envelope-from dumbbell@FreeBSD.org) id 247f by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 14:55:39 +0000 From: Jean-Sebastien Pedron Date: Sun, 10 Aug 2014 14:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269779 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e787eb.247f.4de6e89f@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 14:55:40 -0000 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);