lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181015183605.GB28454@kroah.com>
Date:   Mon, 15 Oct 2018 20:36:05 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     rkir@...gle.com
Cc:     linux-kernel@...r.kernel.org, tkjos@...gle.com
Subject: Re: [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@...gle.com wrote:
> From: Roman Kiryanov <rkir@...gle.com>
> 
> This way deinit will have a chance to report an error.
> 
> Signed-off-by: Roman Kiryanov <rkir@...gle.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ