From patchwork Thu Sep 15 14:41:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9333813 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4DB676077A for ; Thu, 15 Sep 2016 14:41:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 414E72988D for ; Thu, 15 Sep 2016 14:41:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35F8B298C6; Thu, 15 Sep 2016 14:41:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBC112988D for ; Thu, 15 Sep 2016 14:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751074AbcIOOld (ORCPT ); Thu, 15 Sep 2016 10:41:33 -0400 Received: from mout.web.de ([212.227.17.11]:51951 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731AbcIOOlb (ORCPT ); Thu, 15 Sep 2016 10:41:31 -0400 Received: from [192.168.1.2] ([77.181.210.244]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LbJ4A-1bHESI3Vog-00l0SE; Thu, 15 Sep 2016 16:41:20 +0200 Subject: [PATCH 2/6] crypto-caamhash: Rename jump labels in ahash_setkey() To: linux-crypto@vger.kernel.org, "David S. Miller" , Herbert Xu , Labbe Corentin , Russell King References: <566ABCD9.1060404@users.sourceforge.net> <970e9e1b-c1dc-eb28-b380-92c15e9b1961@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <18b28eb8-f683-9181-8de9-f6288533ff66@users.sourceforge.net> Date: Thu, 15 Sep 2016 16:41:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <970e9e1b-c1dc-eb28-b380-92c15e9b1961@users.sourceforge.net> X-Provags-ID: V03:K0:8TmvQF2kgbByy+KRXvIcLOquDCbnhTH1hOcjQgNRm5lYRZMK9TI QLMKXmMw+MTqsDcAr99wu6tehzLer0/Y+hPkiQSPgC1vnGOkRyQ9iX2p021HH93uyIUzTHO GwCZQkxUgWKQxh8mWfsUQZBBFl2BnB274pvtsAE4iWQJ09E57SPM3sOIP0JGePIJlcANzsO ej159ZqfnKGnXkia3UfMQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:tDl0pNKF0Ac=:mjdHwtdHYlmrngScVMcS9B UJ6y9yw95WToQed8xw4nEqXvSZgMuy373KAMbclCPAb6K0erUg9uLp5Vmgy04mtjvJTrgGN+l Qxs5Nv2H8mY20tmMB2f6xewg9GkQIyJ3D/g4Iy4ArK82qZ33+1FXHnInC2g+aONkRuIK8u+4B DKD0A5RNzVtyJuCeaDqcTa7AHZzocnxCLCkvzPA14/F1/oAZ5bTbBJ/YummYjHmsijhXqyDwI qRbJG8++JpBUabDt+lyiFXuGC7cTY9Xfcu7/assYnTGhG/9U+udrBbkATWoBD/lv8layFgrQI nLXg3jMnE0bqmZW6V6XOIUHVVXhSecOOb6yAUI1OY8jVDzVJd8jziqtgseSPOx5G5wjXdGBCD QO/34nep2TAp9a62Qn1JD8TddITvNfnenIOWKkdPSiSH1vJ7k6CA/b2bzlRlZ0yrWx+P3sh2d /69QqurYUeunOobgDtOM7ys1dMF3Gsawd0R4PJXn7ccL90s/NeCTc5c6gi7CIq/TzGArPwVIy ZsGPmDmnk2QO7ab5ArzWq+GdAlG7idMfvyfPwbWq53vSwKZlyY4qrbttN4aNXSdshfaI1gHXi rJdQkVaVWdNT0DkAsXkkk8KcKZc+T8xo3jMCcZKa6CnflpTudmR7LZ0ynxrrJ0TZhcYaZLdoI OwBOzP+sIWACq8Ubu3I1cC9VbjI3de1G7zHAGdg8/ZxcBQg1EMFnwrnaXsnKgcJAsLIIr3aO6 9s4MoP6eAUFW01g+7WB3iR3y1z1+Rry3y+h85v+vbkcpfbeqQlsyBs/1qoSqrYTZsSrY0g5F5 B5XgZ4E Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 15 Sep 2016 13:54:49 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamhash.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index f19df8f..6017470 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -533,7 +533,7 @@ static int ahash_setkey(struct crypto_ahash *ahash, ret = hash_digest_key(ctx, key, &keylen, hashed_key, digestsize); if (ret) - goto badkey; + goto bad_free_key; key = hashed_key; } @@ -551,14 +551,14 @@ static int ahash_setkey(struct crypto_ahash *ahash, ret = gen_split_hash_key(ctx, key, keylen); if (ret) - goto badkey; + goto bad_free_key; ctx->key_dma = dma_map_single(jrdev, ctx->key, ctx->split_key_pad_len, DMA_TO_DEVICE); if (dma_mapping_error(jrdev, ctx->key_dma)) { dev_err(jrdev, "unable to map key i/o memory\n"); ret = -ENOMEM; - goto map_err; + goto error_free_key; } #ifdef DEBUG print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ", @@ -571,11 +571,10 @@ static int ahash_setkey(struct crypto_ahash *ahash, dma_unmap_single(jrdev, ctx->key_dma, ctx->split_key_pad_len, DMA_TO_DEVICE); } - -map_err: + error_free_key: kfree(hashed_key); return ret; -badkey: + bad_free_key: kfree(hashed_key); crypto_ahash_set_flags(ahash, CRYPTO_TFM_RES_BAD_KEY_LEN); return -EINVAL;