Re: [PATCH] crypto: ccp: Use scoped guard for mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/8/24 20:00, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@xxxxxxx>
> 
> Using a scoped guard simplifies the cleanup handling.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
> ---
>  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;
>  }




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux