Re: [PATCH] [stable 3.18] fix __unflatten_device_tree warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 24, 2017 at 04:30:01PM +0200, Arnd Bergmann wrote:
> A backported patch needs to be modified for a context change
> 
> drivers/of/fdt.c:384:10: warning: 'return' with a value, in function returning void
> 
> Fixes: 0aa459efa045 ("of: fdt: add missing allocation-failure check")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
>  drivers/of/fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index e706bced9b6b..74c7aba476f6 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -381,7 +381,7 @@ static void __unflatten_device_tree(void *blob,
>  	/* Allocate memory for the expanded device tree */
>  	mem = dt_alloc(size + 4, __alignof__(struct device_node));
>  	if (!mem)
> -		return NULL;
> +		return;
>  
>  	memset(mem, 0, size);
>  

Ah, this is still in a patch that I have not released yet, nice!  I've
now flattened this with the original one, many thanks for it.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]