summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-03-08 13:45:31 +0100
committerLee Jones <lee.jones@linaro.org>2018-05-16 09:21:48 +0100
commita9241b0921171bc8e595fa200aa021565cefcdcd (patch)
treed9e2eeed170e92024973e1d89894add43384034c /drivers/mfd
parent6271299d273831bd8f5934e5d6ddf7756cae91f3 (diff)
downloadop-kernel-dev-a9241b0921171bc8e595fa200aa021565cefcdcd.zip
op-kernel-dev-a9241b0921171bc8e595fa200aa021565cefcdcd.tar.gz
mfd: si476x-i2c: Delete an error message for a failed memory allocation in si476x_core_probe()
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> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/si476x-i2c.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mfd/si476x-i2c.c b/drivers/mfd/si476x-i2c.c
index e6a3d99..2c5ec93 100644
--- a/drivers/mfd/si476x-i2c.c
+++ b/drivers/mfd/si476x-i2c.c
@@ -697,11 +697,9 @@ static int si476x_core_probe(struct i2c_client *client,
int cell_num;
core = devm_kzalloc(&client->dev, sizeof(*core), GFP_KERNEL);
- if (!core) {
- dev_err(&client->dev,
- "failed to allocate 'struct si476x_core'\n");
+ if (!core)
return -ENOMEM;
- }
+
core->client = client;
core->regmap = devm_regmap_init_si476x(core);
OpenPOWER on IntegriCloud