Commit 0fd58435 authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

[media] i2c: Delete an error messages for failed memory allocation

Omit extra messages for memory allocation failures.

This issue was detected by using the Coccinelle software.

[mchehab@s-opensource.com: merged similar patches]
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 3eefbc69
......@@ -1098,11 +1098,8 @@ static int ov2640_probe(struct i2c_client *client,
}
priv = devm_kzalloc(&client->dev, sizeof(struct ov2640_priv), GFP_KERNEL);
if (!priv) {
dev_err(&adapter->dev,
"Failed to allocate memory for private data!\n");
if (!priv)
return -ENOMEM;
}
if (client->dev.of_node) {
priv->clk = devm_clk_get(&client->dev, "xvclk");
......
......@@ -951,11 +951,8 @@ static int ov6650_probe(struct i2c_client *client,
int ret;
priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
if (!priv) {
dev_err(&client->dev,
"Failed to allocate memory for private data!\n");
if (!priv)
return -ENOMEM;
}
v4l2_i2c_subdev_init(&priv->subdev, client, &ov6650_subdev_ops);
v4l2_ctrl_handler_init(&priv->hdl, 13);
......
......@@ -676,11 +676,8 @@ static int ov9640_probe(struct i2c_client *client,
}
priv = devm_kzalloc(&client->dev, sizeof(struct ov9640_priv), GFP_KERNEL);
if (!priv) {
dev_err(&client->dev,
"Failed to allocate memory for private data!\n");
if (!priv)
return -ENOMEM;
}
v4l2_i2c_subdev_init(&priv->subdev, client, &ov9640_subdev_ops);
......
......@@ -936,10 +936,8 @@ static int ov9740_probe(struct i2c_client *client,
}
priv = devm_kzalloc(&client->dev, sizeof(struct ov9740_priv), GFP_KERNEL);
if (!priv) {
dev_err(&client->dev, "Failed to allocate private data!\n");
if (!priv)
return -ENOMEM;
}
v4l2_i2c_subdev_init(&priv->subdev, client, &ov9740_subdev_ops);
v4l2_ctrl_handler_init(&priv->hdl, 13);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment