From bad87216fb8426302cd53a5fcfdd45c3a5d54383 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Tue, 7 Aug 2018 21:02:34 +0800 Subject: libceph: remove unnecessary non NULL check for request_key request_key never return NULL,so no need do non-NULL check. Signed-off-by: YueHaibing Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov --- net/ceph/ceph_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index 6ebd7d953ee0..87afb9ec4c68 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c @@ -304,7 +304,7 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name) { struct ceph_crypto_key *ckey; ukey = request_key(&key_type_ceph, name, NULL); - if (!ukey || IS_ERR(ukey)) { + if (IS_ERR(ukey)) { /* request_key errors don't map nicely to mount(2) errors; don't even try, but still printk */ key_err = PTR_ERR(ukey); -- cgit v1.2.3