lkml.org 
[lkml]   [2018]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 07/15] platform: goldfish: pipe: Return status from "deinit" since "remove" does not do much
On Wed, Oct 03, 2018 at 10:17:12AM -0700, rkir@google.com wrote:
> From: Roman Kiryanov <rkir@google.com>
>
> This way deinit will have a chance to report an error.
>
> Signed-off-by: Roman Kiryanov <rkir@google.com>
> ---
> 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

\
 
 \ /
  Last update: 2018-10-15 20:36    [W:0.143 / U:26.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site