If the buffer pointer is NULL we already are in troubles since
regmap bulk API expects caller to provide valid parameters,
it dereferences that without any checks before we call for
traces.
Moreover, the current code will print garbage in the case of
buffer is NULL and length is not 0.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220901132336.33234-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
__assign_str(name, regmap_name(map));
__entry->reg = reg;
__entry->val_len = val_len;
- if (val)
- memcpy(__get_dynamic_array(buf), val, val_len);
+ memcpy(__get_dynamic_array(buf), val, val_len);
),
TP_printk("%s reg=%x val=%s", __get_str(name),