[PATCH -next] firmware: arm_sdei: simplify the return expression of sdei_device_freeze()

Gavin Shan gshan at redhat.com
Tue Sep 15 23:40:16 EDT 2020


On 9/15/20 1:26 PM, Liu Shixin wrote:
> Simplify the return expression.
> 
> Signed-off-by: Liu Shixin <liushixin2 at huawei.com>
> ---

Reviewed-by: Gavin Shan <gshan at redhat.com>

>   drivers/firmware/arm_sdei.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
> index b4b9ce97f415..5b4c8c51cb20 100644
> --- a/drivers/firmware/arm_sdei.c
> +++ b/drivers/firmware/arm_sdei.c
> @@ -798,16 +798,10 @@ static int sdei_device_resume(struct device *dev)
>    */
>   static int sdei_device_freeze(struct device *dev)
>   {
> -	int err;
> -
>   	/* unregister private events */
>   	cpuhp_remove_state(CPUHP_AP_ARM_SDEI_STARTING);
>   
> -	err = sdei_unregister_shared();
> -	if (err)
> -		return err;
> -
> -	return 0;
> +	return sdei_unregister_shared();
>   }
>   
>   static int sdei_device_thaw(struct device *dev)
> 




More information about the linux-arm-kernel mailing list