Re: [PATCHv2 5/5] staging:android:ion: Fix void function return
From: Greg KH
Date: Fri Sep 23 2016 - 04:44:43 EST
On Fri, Sep 23, 2016 at 11:05:17AM +0300, giannis.damigos@xxxxxxxxx wrote:
> From: Yannis Damigos <giannis.damigos@xxxxxxxxx>
>
> This patch removes the return statement of void function
>
> WARNING: void function return statements are not generally useful
> + return;
> +}
>
> Signed-off-by: Yannis Damigos <giannis.damigos@xxxxxxxxx>
> ---
> drivers/staging/android/ion/ion_of.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/staging/android/ion/ion_of.c b/drivers/staging/android/ion/ion_of.c
> index 49f052c..c930416 100644
> --- a/drivers/staging/android/ion/ion_of.c
> +++ b/drivers/staging/android/ion/ion_of.c
> @@ -161,7 +161,6 @@ static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev)
> static void rmem_ion_device_release(struct reserved_mem *rmem,
> struct device *dev)
> {
> - return;
> }
Why have an empty release function at all? If it can be empty, you
should be able to drop the function entirely, right?
thanks,
greg k-h