[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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Markus Elfring
2017-09-02 11:07:31 -03:00
committed by Mauro Carvalho Chehab
parent 3eefbc69bb
commit 0fd5843589
4 changed files with 4 additions and 15 deletions

View File

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