On Mon, Jul 20, 2015 at 08:41:50PM +0800, Henry Chen wrote:
> The regmap_format will not be initialize since regmap_bus is not assgined 
> on regmap_init(). It should has a function check before using 
> format_val() to avoid null function called on regmap_bulk_read().

> -                     map->format.format_val(val + (i * val_bytes), ival, 0);
> +                     if (map->format.format_val)
> +                             map->format.format_val(val + (i * val_bytes), 
> ival, 0);
> +                     else
> +                             memcpy(val + (i * val_bytes), &ival, val_bytes);

Your changelog doesn't explan why we are in this code path in the first
place without a format_val() and why a memcpy() is an appropriate
replacement.  It should, it's not clear to me that this is a good fix
but I don't feel I fully understand the problem.

Attachment: signature.asc
Description: Digital signature

Reply via email to