regmap: trace: Remove useless check for NULL for bulk ops
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>
This commit is contained in:
parent
d57f2035c0
commit
f78d5e1168
@ -82,8 +82,7 @@ DECLARE_EVENT_CLASS(regmap_bulk,
|
||||
__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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user