diff options
-rw-r--r-- | sys/arch/hppa/dev/apic.c | 8 | ||||
-rw-r--r-- | sys/arch/hppa64/dev/apic.c | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/sys/arch/hppa/dev/apic.c b/sys/arch/hppa/dev/apic.c index d287d182a16..7196b9207a9 100644 --- a/sys/arch/hppa/dev/apic.c +++ b/sys/arch/hppa/dev/apic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apic.c,v 1.16 2014/12/09 06:58:28 doug Exp $ */ +/* $OpenBSD: apic.c,v 1.17 2015/08/12 05:39:36 mlarkin Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -170,10 +170,8 @@ apic_intr_establish(void *v, pci_intr_handle_t ih, return (NULL); aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT); - if (aiv == NULL) { - free(cnt, M_DEVBUF, 0); - return NULL; - } + if (aiv == NULL) + return (NULL); cnt = malloc(sizeof(struct evcount), M_DEVBUF, M_NOWAIT); if (!cnt) { diff --git a/sys/arch/hppa64/dev/apic.c b/sys/arch/hppa64/dev/apic.c index be4410f3671..5f087a8481f 100644 --- a/sys/arch/hppa64/dev/apic.c +++ b/sys/arch/hppa64/dev/apic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apic.c,v 1.8 2014/12/09 06:58:28 doug Exp $ */ +/* $OpenBSD: apic.c,v 1.9 2015/08/12 05:39:36 mlarkin Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -172,10 +172,8 @@ apic_intr_establish(void *v, pci_intr_handle_t ih, return (NULL); aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT); - if (aiv == NULL) { - free(cnt, M_DEVBUF, 0); - return NULL; - } + if (aiv == NULL) + return (NULL); aiv->sc = sc; aiv->ih = ih; |