提交 a9241b09 编写于 作者: M Markus Elfring 提交者: Lee Jones

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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 6271299d
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册