aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/media/i2c/ov2640.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-09-02 11:07:31 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2017-10-04 17:15:22 -0300
commit0fd58435890aa9f2d44baaa2f328f7f8f512f4dc (patch)
tree912b7fe1390564f9ec54f435ca7b99567fe4d08a /drivers/media/i2c/ov2640.c
parent[media] media: ov5670: Fix not streaming issue after resume (diff)
downloadwireguard-linux-0fd58435890aa9f2d44baaa2f328f7f8f512f4dc.tar.xz
wireguard-linux-0fd58435890aa9f2d44baaa2f328f7f8f512f4dc.zip
[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/ov2640.c')
-rw-r--r--drivers/media/i2c/ov2640.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c
index 5f013c8cbdb5..c0d0c50f1d02 100644
--- a/drivers/media/i2c/ov2640.c
+++ b/drivers/media/i2c/ov2640.c
@@ -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");