summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-06-26 12:34:54 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-06-26 12:34:54 +0000
commit9946c59860e45c29c4b5fb28f3d237c010dbecc1 (patch)
treeaf0385a34a0d2f173a210b92a7e2168ede931f8c /sys/arch
parent22e098a415eb0534e3ae11dfcd637612703d3f0b (diff)
avoid uninitialised pointer use
found with scan-build, ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc64/dev/phb.c4
-rw-r--r--sys/arch/powerpc64/powerpc64/cpu.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/powerpc64/dev/phb.c b/sys/arch/powerpc64/dev/phb.c
index 4c8e35c8a66..1d664fe6d74 100644
--- a/sys/arch/powerpc64/dev/phb.c
+++ b/sys/arch/powerpc64/dev/phb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: phb.c,v 1.8 2020/06/14 19:00:12 kettenis Exp $ */
+/* $OpenBSD: phb.c,v 1.9 2020/06/26 12:34:53 jsg Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
*
@@ -483,7 +483,7 @@ phb_intr_establish(void *v, pci_intr_handle_t ih, int level,
int (*func)(void *), void *arg, char *name)
{
struct phb_softc *sc = v;
- void *cookie;
+ void *cookie = NULL;
KASSERT(ih.ih_type != PCI_NONE);
diff --git a/sys/arch/powerpc64/powerpc64/cpu.c b/sys/arch/powerpc64/powerpc64/cpu.c
index 8483c9965c4..9ffa3db077d 100644
--- a/sys/arch/powerpc64/powerpc64/cpu.c
+++ b/sys/arch/powerpc64/powerpc64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.7 2020/06/17 20:58:20 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.8 2020/06/26 12:34:53 jsg Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
@@ -86,7 +86,7 @@ void
cpu_attach(struct device *parent, struct device *dev, void *aux)
{
struct fdt_attach_args *faa = aux;
- const char *name;
+ const char *name = NULL;
uint32_t pvr;
uint32_t iline;
uint32_t dline;