diff options
| author | jmcneill <jmcneill@NetBSD.org> | 2021-03-02 11:51:00 +0000 |
|---|---|---|
| committer | jmcneill <jmcneill@NetBSD.org> | 2021-03-02 11:51:00 +0000 |
| commit | 87cd84c7ce2c1928bf3b66892f5537904bf6187b (patch) | |
| tree | 005aa92e35b0c5eedebebd7ae3094f8abafa2b08 /sys/dev | |
| parent | 34da1dca438cddb2010fc8602cb09ff46a4d1c27 (diff) | |
Fix previous: Each line is "stride" bytes wide, not "width * depth".
While here, add a comment explaining what this test is doing.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/fdt/simplefb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/fdt/simplefb.c b/sys/dev/fdt/simplefb.c index c3803779608..993a1165d9a 100644 --- a/sys/dev/fdt/simplefb.c +++ b/sys/dev/fdt/simplefb.c @@ -1,4 +1,4 @@ -/* $NetBSD: simplefb.c,v 1.13 2021/03/02 07:02:06 skrll Exp $ */ +/* $NetBSD: simplefb.c,v 1.14 2021/03/02 11:51:00 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca> @@ -29,7 +29,7 @@ #include "opt_wsdisplay_compat.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.13 2021/03/02 07:02:06 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.14 2021/03/02 11:51:00 jmcneill Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -169,7 +169,7 @@ simplefb_attach_genfb(struct simplefb_softc *sc) return ENXIO; } - if (size < width * height * depth) { + if (size < stride * height) { aprint_error(": incorrect size\n"); return ENXIO; } |
