Module Name: src
Committed By: thorpej
Date: Sat Aug 17 15:05:14 UTC 2024
Modified Files:
src/sys/arch/alpha/pci: sio_pic.c
Log Message:
In cy82c693_setup_elcr(), panic if cy82c693_init() fails as I suggested
should be done in a comment I wrote in this very file 26 years ago.
To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/alpha/pci/sio_pic.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/alpha/pci/sio_pic.c
diff -u src/sys/arch/alpha/pci/sio_pic.c:1.53 src/sys/arch/alpha/pci/sio_pic.c:1.54
--- src/sys/arch/alpha/pci/sio_pic.c:1.53 Thu Jul 15 01:29:23 2021
+++ src/sys/arch/alpha/pci/sio_pic.c Sat Aug 17 15:05:13 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: sio_pic.c,v 1.53 2021/07/15 01:29:23 thorpej Exp $ */
+/* $NetBSD: sio_pic.c,v 1.54 2024/08/17 15:05:13 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2000, 2020 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v 1.53 2021/07/15 01:29:23 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v 1.54 2024/08/17 15:05:13 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -229,6 +229,9 @@ cy82c693_setup_elcr(void)
#endif
sio_cy82c693_handle = cy82c693_init(sio_iot);
+ if (sio_cy82c693_handle == NULL) {
+ panic("%s: cy82c693_init() failed.", __func__);
+ }
sio_read_elcr = cy82c693_read_elcr;
sio_write_elcr = cy82c693_write_elcr;