Simplify the return expression.
Signed-off-by: Liu Shixin <[email protected]>
---
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)
--
2.25.1
On 9/15/20 1:26 PM, Liu Shixin wrote:
> Simplify the return expression.
>
> Signed-off-by: Liu Shixin <[email protected]>
> ---
Reviewed-by: Gavin Shan <[email protected]>
> 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)
>