Skip to content

Commit

Permalink
libceph: remove unnecessary non NULL check for request_key
Browse files Browse the repository at this point in the history
request_key never return NULL,so no need do non-NULL check.

Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Ilya Dryomov <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
  • Loading branch information
YueHaibing authored and idryomov committed Aug 13, 2018
1 parent e5bc08d commit bad8721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ceph/ceph_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bad8721

Please sign in to comment.