summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/adv7842.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-28 12:46:57 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-23 15:19:55 +0300
commitc38e8657a471e9af42b86009e5d3085031b41fda (patch)
treeb2bb818ff8b099ee5237da0ab3b9db680b520a0b /drivers/media/i2c/adv7842.c
parenta0ec8d1dc42e4255307cb1b95345c01c327a10a6 (diff)
downloadlinux-c38e8657a471e9af42b86009e5d3085031b41fda.tar.xz
media: drivers: delete error messages for failed memory allocation
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. [mchehab@s-opensource.com: fold several similar patches into one] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/adv7842.c')
-rw-r--r--drivers/media/i2c/adv7842.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index 65f34e7e146f..c582bcb782a6 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -3468,10 +3468,8 @@ static int adv7842_probe(struct i2c_client *client,
}
state = devm_kzalloc(&client->dev, sizeof(struct adv7842_state), GFP_KERNEL);
- if (!state) {
- v4l_err(client, "Could not allocate adv7842_state memory!\n");
+ if (!state)
return -ENOMEM;
- }
/* platform data */
state->pdata = *pdata;