From 0fd58435890aa9f2d44baaa2f328f7f8f512f4dc Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Sat, 2 Sep 2017 11:07:31 -0300 Subject: [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 Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/ov6650.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/media/i2c/ov6650.c') diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index 768f2950ea36..8975d16b2b24 100644 --- a/drivers/media/i2c/ov6650.c +++ b/drivers/media/i2c/ov6650.c @@ -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); -- cgit v1.2.3