Merge tag 'keys-misc-20210126' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowe...
[linux-2.6-microblaze.git] / net / rxrpc / key.c
index 9631aa8..8d2073e 100644 (file)
@@ -598,7 +598,7 @@ static long rxrpc_read(const struct key *key,
                default: /* we have a ticket we can't encode */
                        pr_err("Unsupported key token type (%u)\n",
                               token->security_index);
-                       continue;
+                       return -ENOPKG;
                }
 
                _debug("token[%u]: toksize=%u", ntoks, toksize);
@@ -674,7 +674,9 @@ static long rxrpc_read(const struct key *key,
                        break;
 
                default:
-                       break;
+                       pr_err("Unsupported key token type (%u)\n",
+                              token->security_index);
+                       return -ENOPKG;
                }
 
                ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,