summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid_concat.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2013-03-02 12:50:01 +0000
committerjsing <jsing@openbsd.org>2013-03-02 12:50:01 +0000
commit70bf54cecd13fa611a7feb0e989c4756e21e8e70 (patch)
treeb1c54192b7db6396d371452a4243ac7e1b68fa86 /sys/dev/softraid_concat.c
parentWhen a PF rule contains 'set tos' *followed by* a scrub option, the tos (diff)
downloadwireguard-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_concat.c')
-rw-r--r--sys/dev/softraid_concat.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/softraid_concat.c b/sys/dev/softraid_concat.c
index 66f40cf3f34..0242954503a 100644
--- a/sys/dev/softraid_concat.c
+++ b/sys/dev/softraid_concat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_concat.c,v 1.10 2013/03/02 12:25:55 jsing Exp $ */
+/* $OpenBSD: softraid_concat.c,v 1.11 2013/03/02 12:50:01 jsing Exp $ */
/*
* Copyright (c) 2008 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
@@ -85,7 +85,6 @@ int
sr_concat_assemble(struct sr_discipline *sd, struct bioc_createraid *bc,
int no_chunk, void *data)
{
-
sd->sd_max_ccb_per_wu = SR_CONCAT_NOWU * no_chunk;
return 0;
@@ -96,9 +95,6 @@ sr_concat_alloc_resources(struct sr_discipline *sd)
{
int rv = EINVAL;
- if (!sd)
- return (rv);
-
DNPRINTF(SR_D_DIS, "%s: sr_concat_alloc_resources\n",
DEVNAME(sd->sd_sc));
@@ -117,9 +113,6 @@ sr_concat_free_resources(struct sr_discipline *sd)
{
int rv = EINVAL;
- if (!sd)
- return (rv);
-
DNPRINTF(SR_D_DIS, "%s: sr_concat_free_resources\n",
DEVNAME(sd->sd_sc));