]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - crypto/xts.c
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[mirror_ubuntu-bionic-kernel.git] / crypto / xts.c
index af68012dfab373612fa398002a7eb4cb65273452..f317c48b5e4320820aa0c748d3ddbddc66ddfbcb 100644 (file)
@@ -550,8 +550,10 @@ static int create(struct crypto_template *tmpl, struct rtattr **tb)
                ctx->name[len - 1] = 0;
 
                if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME,
-                            "xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME)
-                       return -ENAMETOOLONG;
+                            "xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME) {
+                       err = -ENAMETOOLONG;
+                       goto err_drop_spawn;
+               }
        } else
                goto err_drop_spawn;