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:
Markus Elfring 2018-02-01 17:17:19 +01:00 committed by Peter Rosin
parent a2f8445d4c
commit b30c08a24c
1 changed files with 1 additions and 3 deletions

View File

@ -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);