summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_aoe.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2013-03-02 12:50:02 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2013-03-02 12:50:02 +0000
commit0150b0672b94bcf7621df4d1c6ab6119c086d1ae (patch)
treea85007aed1603e0825d06ed19f622cad1cb801a3 /sys/dev/softraid_aoe.c
parent66ae7c70242e92ede27f6a886ab2db91ea2e0983 (diff)
sr_alloc_resources() and sr_free_resources() can never be called without
a valid struct sr_discipline. Remove redundant NULL pointer checks.
Diffstat (limited to 'sys/dev/softraid_aoe.c')
-rw-r--r--sys/dev/softraid_aoe.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/sys/dev/softraid_aoe.c b/sys/dev/softraid_aoe.c
index f2cab3dc29c..6134edaed61 100644
--- a/sys/dev/softraid_aoe.c
+++ b/sys/dev/softraid_aoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_aoe.c,v 1.29 2013/01/16 06:42:22 jsing Exp $ */
+/* $OpenBSD: softraid_aoe.c,v 1.30 2013/03/02 12:50:01 jsing Exp $ */
/*
* Copyright (c) 2008 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2008 Marco Peereboom <marco@openbsd.org>
@@ -243,9 +243,6 @@ out:
int
sr_aoe_alloc_resources(struct sr_discipline *sd)
{
- if (!sd)
- return (EINVAL);
-
DNPRINTF(SR_D_DIS, "%s: sr_aoe_alloc_resources\n",
DEVNAME(sd->sd_sc));
@@ -261,9 +258,6 @@ sr_aoe_free_resources(struct sr_discipline *sd)
int s, rv = EINVAL;
struct aoe_handler *ah;
- if (!sd)
- return (rv);
-
DNPRINTF(SR_D_DIS, "%s: sr_aoe_free_resources\n",
DEVNAME(sd->sd_sc));
@@ -604,9 +598,6 @@ sr_aoe_server_alloc_resources(struct sr_discipline *sd)
struct aoe_handler *ah;
struct ifnet *ifp;
- if (!sd)
- return (rv);
-
DNPRINTF(SR_D_DIS, "%s: sr_aoe_server_alloc_resources\n",
DEVNAME(sd->sd_sc));
@@ -655,9 +646,6 @@ sr_aoe_server_free_resources(struct sr_discipline *sd)
{
int s;
- if (!sd)
- return (EINVAL);
-
DNPRINTF(SR_D_DIS, "%s: sr_aoe_server_free_resources\n",
DEVNAME(sd->sd_sc));