Commit b30c08a2 authored by Markus Elfring's avatar Markus Elfring Committed by Peter Rosin
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarAlexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
parent a2f8445d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -127,10 +127,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux,
	values = devm_kzalloc(&pdev->dev,
			      sizeof(*mux->data.values) * mux->data.n_values,
			      GFP_KERNEL);
	if (!values) {
		dev_err(&pdev->dev, "Cannot allocate values array");
	if (!values)
		return -ENOMEM;
	}

	for_each_child_of_node(np, child) {
		of_property_read_u32(child, "reg", values + i);