diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2013-03-02 12:50:02 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2013-03-02 12:50:02 +0000 |
commit | 0150b0672b94bcf7621df4d1c6ab6119c086d1ae (patch) | |
tree | a85007aed1603e0825d06ed19f622cad1cb801a3 /sys/dev/softraid_crypto.c | |
parent | 66ae7c70242e92ede27f6a886ab2db91ea2e0983 (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_crypto.c')
-rw-r--r-- | sys/dev/softraid_crypto.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c index 5fa357ef2bc..bae844b6857 100644 --- a/sys/dev/softraid_crypto.c +++ b/sys/dev/softraid_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_crypto.c,v 1.86 2013/01/18 23:22:18 jsing Exp $ */ +/* $OpenBSD: softraid_crypto.c,v 1.87 2013/03/02 12:50:01 jsing Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org> @@ -960,9 +960,6 @@ sr_crypto_alloc_resources(struct sr_discipline *sd) struct sr_crypto_wu *crwu; u_int num_keys, i; - if (!sd) - return (EINVAL); - DNPRINTF(SR_D_DIS, "%s: sr_crypto_alloc_resources\n", DEVNAME(sd->sd_sc)); @@ -1054,9 +1051,6 @@ sr_crypto_free_resources(struct sr_discipline *sd) struct sr_crypto_wu *crwu; u_int i; - if (!sd) - return (rv); - DNPRINTF(SR_D_DIS, "%s: sr_crypto_free_resources\n", DEVNAME(sd->sd_sc)); |