public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Mario Limonciello <superm1@kernel.org>,
	John Allen <john.allen@amd.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: [PATCH] crypto: ccp: Use scoped guard for mutex
Date: Mon, 11 Nov 2024 08:28:18 -0600	[thread overview]
Message-ID: <e2102da1-3418-01d9-06ff-0e7bbb427e38@amd.com> (raw)
In-Reply-To: <20241109020054.3877377-1-superm1@kernel.org>

On 11/8/24 20:00, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> Using a scoped guard simplifies the cleanup handling.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/crypto/ccp/dbc.c | 48 +++++++++++++++-------------------------
>  1 file changed, 18 insertions(+), 30 deletions(-)
> 

>  	default:
>  		ret = -EINVAL;

Might as well make this a return -EINVAL and get rid of the return ret
at the end of the function, too.

Thanks,
Tom

>  
>  	}
> -unlock:
> -	mutex_unlock(&dbc_dev->ioctl_mutex);
>  
>  	return ret;
>  }

      parent reply	other threads:[~2024-11-11 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-09  2:00 [PATCH] crypto: ccp: Use scoped guard for mutex Mario Limonciello
2024-11-10  9:25 ` Markus Elfring
2024-11-11 14:28 ` Tom Lendacky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2102da1-3418-01d9-06ff-0e7bbb427e38@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=john.allen@amd.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=superm1@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox