KEYS: Use the variable 'key' in keyctl_describe_key()
[firefly-linux-kernel-4.4.55.git] / security / keys / keyctl.c
index 639226afd0db8feeae6886de7a44b46033e71ade..b2b0998d6abda7759433d7032d255eb0a317c126 100644 (file)
@@ -505,13 +505,11 @@ okay:
 
        ret = snprintf(tmpbuf, PAGE_SIZE - 1,
                       "%s;%d;%d;%08x;%s",
-                      key_ref_to_ptr(key_ref)->type->name,
-                      key_ref_to_ptr(key_ref)->uid,
-                      key_ref_to_ptr(key_ref)->gid,
-                      key_ref_to_ptr(key_ref)->perm,
-                      key_ref_to_ptr(key_ref)->description ?
-                      key_ref_to_ptr(key_ref)->description : ""
-                      );
+                      key->type->name,
+                      key->uid,
+                      key->gid,
+                      key->perm,
+                      key->description ?: "");
 
        /* include a NUL char at the end of the data */
        if (ret > PAGE_SIZE - 1)