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: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> Signed-off-by: Peter Rosin <peda@axentia.se>
This commit is contained in:

committed by
Peter Rosin

parent
a2f8445d4c
commit
b30c08a24c
@@ -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);
|
||||||
|
Reference in New Issue
Block a user