From c38e8657a471e9af42b86009e5d3085031b41fda Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Mon, 28 Aug 2017 05:46:57 -0400 Subject: 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/adv7604.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/media/i2c/adv7604.c') diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index f289b8aca1da..5217f9ad5e6b 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -3316,10 +3316,8 @@ static int adv76xx_probe(struct i2c_client *client, client->addr << 1); state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); - if (!state) { - v4l_err(client, "Could not allocate adv76xx_state memory!\n"); + if (!state) return -ENOMEM; - } state->i2c_clients[ADV76XX_PAGE_IO] = client; -- cgit