Skip to content

Commit 97eb7ca

Browse files
committed
Use KM_SLEEP in attach path code.
1 parent f990e95 commit 97eb7ca

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

sys/arch/hppa/dev/summitfb.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: summitfb.c,v 1.25 2024/12/30 08:32:37 macallan Exp $ */
1+
/* $NetBSD: summitfb.c,v 1.26 2025/01/03 13:18:30 skrll Exp $ */
22

33
/* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */
44

@@ -27,7 +27,7 @@
2727
*/
2828

2929
#include <sys/cdefs.h>
30-
__KERNEL_RCSID(0, "$NetBSD: summitfb.c,v 1.25 2024/12/30 08:32:37 macallan Exp $");
30+
__KERNEL_RCSID(0, "$NetBSD: summitfb.c,v 1.26 2025/01/03 13:18:30 skrll Exp $");
3131

3232
#include <sys/param.h>
3333
#include <sys/systm.h>
@@ -1629,11 +1629,10 @@ summitfb_copyfont(struct summitfb_softc *sc)
16291629

16301630
if (font == NULL)
16311631
return;
1632-
bufsize = sizeof(struct wsdisplay_font) + 32 + fp->bpc * ( fp->last - fp->first);
1632+
1633+
bufsize = sizeof(struct wsdisplay_font) + 32 + fp->bpc * (fp->last - fp->first);
16331634
DPRINTF(("%s: %dx%d %d\n", __func__, fp->width, fp->height, bufsize));
1634-
fontbuf = kmem_alloc(bufsize, KM_NOSLEEP);
1635-
if (fontbuf == NULL)
1636-
return;
1635+
fontbuf = kmem_alloc(bufsize, KM_SLEEP);
16371636
f = (struct wsdisplay_font *)fontbuf;
16381637
f->name = fontbuf + sizeof(struct wsdisplay_font);
16391638
fontdata = fontbuf + sizeof(struct wsdisplay_font) + 32;

0 commit comments

Comments
 (0)