On Wed, Oct 03, 2018 at 10:17:12AM -0700, [email protected] wrote:
> From: Roman Kiryanov <[email protected]>
> 
> This way deinit will have a chance to report an error.
> 
> Signed-off-by: Roman Kiryanov <[email protected]>
> ---
> Changes in v3:
>  - No change.
> Changes in v2:
>  - No change.
> 
>  drivers/platform/goldfish/goldfish_pipe.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/platform/goldfish/goldfish_pipe.c 
> b/drivers/platform/goldfish/goldfish_pipe.c
> index 445c0c0c66c4..1822d4146778 100644
> --- a/drivers/platform/goldfish/goldfish_pipe.c
> +++ b/drivers/platform/goldfish/goldfish_pipe.c
> @@ -888,13 +888,15 @@ static int goldfish_pipe_device_init(struct 
> platform_device *pdev,
>       return 0;
>  }
>  
> -static void goldfish_pipe_device_deinit(struct platform_device *pdev,
> -                                     struct goldfish_pipe_dev *dev)
> +static int goldfish_pipe_device_deinit(struct platform_device *pdev,
> +                                    struct goldfish_pipe_dev *dev)
>  {
>       misc_deregister(&dev->miscdev);
>       tasklet_kill(&dev->irq_tasklet);
>       kfree(dev->pipes);
>       free_page((unsigned long)dev->buffers);
> +
> +     return 0;
>  }

This function can not fail, why are you returning 0 always?  That
doesn't make sense.

thanks,

greg k-h

Reply via email to