diff --git a/sys/dev/ic/vga_raster.c b/sys/dev/ic/vga_raster.c index 59c41b9ecd07..3825b4307d3e 100644 --- a/sys/dev/ic/vga_raster.c +++ b/sys/dev/ic/vga_raster.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga_raster.c,v 1.46 2019/12/01 14:18:51 ad Exp $ */ +/* $NetBSD: vga_raster.c,v 1.47 2020/04/04 00:01:28 riastradh Exp $ */ /* * Copyright (c) 2001, 2002 Bang Jun-Young @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.46 2019/12/01 14:18:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.47 2020/04/04 00:01:28 riastradh Exp $"); #include "opt_vga.h" #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */ @@ -440,7 +440,7 @@ vga_raster_init_screen(struct vga_config *vc, struct vgascreen *scr, const struct wsscreen_descr *type, int existing, long *attrp) { int cpos; - int res; + int res __diagused; struct vga_handle *vh; scr->cfg = vc; @@ -513,10 +513,7 @@ vga_raster_init_screen(struct vga_config *vc, struct vgascreen *scr, else #endif res = vga_raster_allocattr(scr, 0, 0, 0, attrp); -#ifdef DIAGNOSTIC - if (res) - panic("vga_raster_init_screen: attribute botch"); -#endif + KASSERTMSG(res == 0, "attribute botch"); vc->nscreens++; LIST_INSERT_HEAD(&vc->screens, scr, next);