diff options
author | 2013-03-02 12:50:01 +0000 | |
---|---|---|
committer | 2013-03-02 12:50:01 +0000 | |
commit | 70bf54cecd13fa611a7feb0e989c4756e21e8e70 (patch) | |
tree | b1c54192b7db6396d371452a4243ac7e1b68fa86 /sys/dev/softraid_raid0.c | |
parent | When a PF rule contains 'set tos' *followed by* a scrub option, the tos (diff) | |
download | wireguard-openbsd-70bf54cecd13fa611a7feb0e989c4756e21e8e70.tar.xz wireguard-openbsd-70bf54cecd13fa611a7feb0e989c4756e21e8e70.zip |
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_raid0.c')
-rw-r--r-- | sys/dev/softraid_raid0.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c index 5c85b87b068..4b83d6c63e5 100644 --- a/sys/dev/softraid_raid0.c +++ b/sys/dev/softraid_raid0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid0.c,v 1.34 2013/03/02 12:25:55 jsing Exp $ */ +/* $OpenBSD: softraid_raid0.c,v 1.35 2013/03/02 12:50:01 jsing Exp $ */ /* * Copyright (c) 2008 Marco Peereboom <marco@peereboom.us> * @@ -114,9 +114,6 @@ sr_raid0_alloc_resources(struct sr_discipline *sd) { int rv = EINVAL; - if (!sd) - return (rv); - DNPRINTF(SR_D_DIS, "%s: sr_raid0_alloc_resources\n", DEVNAME(sd->sd_sc)); @@ -141,9 +138,6 @@ sr_raid0_free_resources(struct sr_discipline *sd) { int rv = EINVAL; - if (!sd) - return (rv); - DNPRINTF(SR_D_DIS, "%s: sr_raid0_free_resources\n", DEVNAME(sd->sd_sc)); |