summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-02 16:02:22 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-09-06 15:26:19 +0200
commitf4ab2ffed62bc7b4a536ba111e5a4aa38157ea29 (patch)
treed89c8ca904205e4f8cabf944f52d1d90762b644e
parent38ea0029ac759fd88f10cc709672628254f964a8 (diff)
downloadkernel-crypto-f4ab2ffed62bc7b4a536ba111e5a4aa38157ea29.tar.gz
kernel-crypto-f4ab2ffed62bc7b4a536ba111e5a4aa38157ea29.tar.xz
kernel-crypto-f4ab2ffed62bc7b4a536ba111e5a4aa38157ea29.zip
Drop unnecessary checks for NULL
-rw-r--r--crypto/userspace/ncr-key.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/crypto/userspace/ncr-key.c b/crypto/userspace/ncr-key.c
index 7e8672770af..b9aee067d3a 100644
--- a/crypto/userspace/ncr-key.c
+++ b/crypto/userspace/ncr-key.c
@@ -482,10 +482,8 @@ size_t size;
ret = 0;
fail:
- if (item) {
- if (ret < 0) item->type = NCR_KEY_TYPE_INVALID;
- _ncr_key_item_put(item);
- }
+ if (ret < 0) item->type = NCR_KEY_TYPE_INVALID;
+ _ncr_key_item_put(item);
return ret;
}
@@ -778,8 +776,7 @@ struct key_item_st* newkey = NULL;
}
fail:
- if (key)
- _ncr_key_item_put(key);
+ _ncr_key_item_put(key);
if (newkey)
_ncr_key_item_put(newkey);
return ret;