Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/pci sc->sc_sensor cannot be NULL since it was j...
details: https://anonhg.NetBSD.org/src/rev/2bfa895f44ba
branches: trunk
changeset: 359049:2bfa895f44ba
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Fri Jan 26 23:01:44 2018 +0000
description:
sc->sc_sensor cannot be NULL since it was just allocated with KM_SLEEP
(which cannot fail). So remove the NULL-check. CID/1428644
diffstat:
sys/arch/x86/pci/amdzentemp.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r f4ef588f6051 -r 2bfa895f44ba sys/arch/x86/pci/amdzentemp.c
--- a/sys/arch/x86/pci/amdzentemp.c Fri Jan 26 22:58:09 2018 +0000
+++ b/sys/arch/x86/pci/amdzentemp.c Fri Jan 26 23:01:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdzentemp.c,v 1.6 2018/01/25 23:37:33 pgoyette Exp $ */
+/* $NetBSD: amdzentemp.c,v 1.7 2018/01/26 23:01:44 pgoyette Exp $ */
/* $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $ */
/*
@@ -50,7 +50,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.6 2018/01/25 23:37:33 pgoyette Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.7 2018/01/26 23:01:44 pgoyette Exp $ ");
#include <sys/param.h>
#include <sys/bus.h>
@@ -167,10 +167,8 @@
sc->sc_sme = NULL;
}
- if (sc->sc_sensor != NULL) {
- kmem_free(sc->sc_sensor, sc->sc_sensor_len);
- sc->sc_sensor = NULL;
- }
+ kmem_free(sc->sc_sensor, sc->sc_sensor_len);
+ sc->sc_sensor = NULL;
}
static int
Home |
Main Index |
Thread Index |
Old Index