summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/muxes
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-02-01 17:17:19 +0100
committerPeter Rosin <peda@axentia.se>2018-05-24 13:14:21 +0200
commitb30c08a24caa89b28c84f09f0d1de94e9017cc36 (patch)
treee6ef6f67fe3bc9d454802785665e138b28428d2d /drivers/i2c/muxes
parenta2f8445d4ca2796283c07d4ba8e78718071de863 (diff)
downloadlinux-b30c08a24caa89b28c84f09f0d1de94e9017cc36.tar.bz2
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>
Diffstat (limited to 'drivers/i2c/muxes')
-rw-r--r--drivers/i2c/muxes/i2c-mux-reg.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
index c948e5a4cb04..f624ed64a47b 100644
--- a/drivers/i2c/muxes/i2c-mux-reg.c
+++ b/drivers/i2c/muxes/i2c-mux-reg.c
@@ -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);