]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
libceph: remove unnecessary non NULL check for request_key
authorYueHaibing <yuehaibing@huawei.com>
Tue, 7 Aug 2018 13:02:34 +0000 (21:02 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 13 Aug 2018 15:55:44 +0000 (17:55 +0200)
request_key never return NULL,so no need do non-NULL check.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/ceph_common.c

index 6ebd7d953ee0a38e4f3cefd27fcc0547e3cca4c4..87afb9ec4c68962b73f96263c60f907e36eb2152 100644 (file)
@@ -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);