diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-09-02 17:07:31 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2017-10-04 23:15:22 +0300 |
commit | 0fd58435890aa9f2d44baaa2f328f7f8f512f4dc (patch) | |
tree | 912b7fe1390564f9ec54f435ca7b99567fe4d08a /drivers/media/i2c/soc_camera | |
parent | 3eefbc69bbdc7bca8c3751e525902d779ca1cdd3 (diff) | |
download | linux-0fd58435890aa9f2d44baaa2f328f7f8f512f4dc.tar.xz |
[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>
Diffstat (limited to 'drivers/media/i2c/soc_camera')
-rw-r--r-- | drivers/media/i2c/soc_camera/ov9640.c | 5 | ||||
-rw-r--r-- | drivers/media/i2c/soc_camera/ov9740.c | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/i2c/soc_camera/ov9640.c b/drivers/media/i2c/soc_camera/ov9640.c index dafea6d90ad9..883500805aac 100644 --- a/drivers/media/i2c/soc_camera/ov9640.c +++ b/drivers/media/i2c/soc_camera/ov9640.c @@ -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); diff --git a/drivers/media/i2c/soc_camera/ov9740.c b/drivers/media/i2c/soc_camera/ov9740.c index cc07b7ae5407..f44f5da795f9 100644 --- a/drivers/media/i2c/soc_camera/ov9740.c +++ b/drivers/media/i2c/soc_camera/ov9740.c @@ -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); |