Re: [PATCH v2 1/3] drivers: of: add return value to of_reserved_mem_device_init

From: Arnd Bergmann
Date: Fri Sep 26 2014 - 16:14:35 EST


On Thursday 11 September 2014, Marek Szyprowski wrote:
> -void of_reserved_mem_device_init(struct device *dev)
> +int of_reserved_mem_device_init(struct device *dev)
> {
> struct reserved_mem *rmem;
> struct device_node *np;
> @@ -260,6 +260,7 @@ void of_reserved_mem_device_init(struct device *dev)
>
> rmem->ops->device_init(rmem, dev);
> dev_info(dev, "assigned reserved memory node %s\n", rmem->name);
> + return 0;
> }

This function has two other 'return' statements that now are missing
a return value for the error case and cause undefined behavior
in the caller.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/