提交 b30c08a2 编写于 作者: M Markus Elfring 提交者: Peter Rosin

i2c: mux: reg: failed memory allocation is logged elsewhere

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: NPeter Rosin <peda@axentia.se>
上级 a2f8445d
...@@ -127,10 +127,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux, ...@@ -127,10 +127,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux,
values = devm_kzalloc(&pdev->dev, values = devm_kzalloc(&pdev->dev,
sizeof(*mux->data.values) * mux->data.n_values, sizeof(*mux->data.values) * mux->data.n_values,
GFP_KERNEL); GFP_KERNEL);
if (!values) { if (!values)
dev_err(&pdev->dev, "Cannot allocate values array");
return -ENOMEM; return -ENOMEM;
}
for_each_child_of_node(np, child) { for_each_child_of_node(np, child) {
of_property_read_u32(child, "reg", values + i); of_property_read_u32(child, "reg", values + i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册