From patchwork Sat Sep 2 13:06:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9935533 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 86E12601A1 for ; Sat, 2 Sep 2017 13:06:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7742127E5A for ; Sat, 2 Sep 2017 13:06:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C38B2861C; Sat, 2 Sep 2017 13:06:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD07A285EF for ; Sat, 2 Sep 2017 13:06:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752677AbdIBNGZ (ORCPT ); Sat, 2 Sep 2017 09:06:25 -0400 Received: from mout.web.de ([217.72.192.78]:54604 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752399AbdIBNGY (ORCPT ); Sat, 2 Sep 2017 09:06:24 -0400 Received: from [192.168.1.2] ([78.48.84.48]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MOipW-1dt5wd1QZy-006ApP; Sat, 02 Sep 2017 15:06:17 +0200 Subject: [PATCH 1/4] [media] adv7604: Delete an error message for a failed memory allocation in adv76xx_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org References: <0e67e095-4931-b78f-a925-7335326ab69c@users.sourceforge.net> Message-ID: Date: Sat, 2 Sep 2017 15:06:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <0e67e095-4931-b78f-a925-7335326ab69c@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:rxivDJ7K82z3SfO3OpjQ7EC6ZsddOFE0WJB/eC9hr/MGVFXvSyv I/YZSwYvnawyVD0UIn044RGg8ffHylPrfJ1Qx/mb4uDQSvI4HWVuiei/ht7lx0FSZsx0Kl6 7fJ5GX6+dlRQtmM4MLxb34dk47LUZx2jFihCQkusZZ4RNBquaButbZNtj40p0Fu+1x8eURv HUaauPA/ZRSuPNf+K8kKw== X-UI-Out-Filterresults: notjunk:1; V01:K0:h22mY6cckFk=:8lC8cX9Ql33QEO2LsrryH4 +nqeOstnVletkEiCbO5gz2BX7dd0pY9Ds6R4HKWUimoR07X0QNd/+N88oNpMBpw1lBLbIsY89 qgGIuVfx8fVzc2s6UgJui4/8IPghTMsmksYZH/6f4PPa7ID7ujBBuB3/sGCl4HFtlscepbl4R Ktsod+sR+ijMzfLi7hwhz+yhPk+ZvtiJwf4eRzkv2FlS4OtUY43uEKLYcm5WJbNxAoDm9IuOj E1tPlUHvz2umSaGDGQobQNtco6dbbKZ8wkUzeRjXL9qyb94JhmbReIudrKCO4Qb461F6H/esZ GYmBEznyYDKh2jyO3Qk2N8dfN8BVAGMwf2uA1BaHVkTaXh8njpLlCm+/Gcu/suDAGCaIkJch7 uwswQiUv20oe3QlUnFpvcaIR7GkndJRf3EOsUq2NTqX04+bJ6iolfPTe8KX5vE2sMIuJnk+7F Aozd/uXTPUpzrw0MHiHYRkVJyH0+nkFzAajLr3zOpOuEEdKm9hNP7/PVvEIWI5gr/fBQV/QyU r6HHvq+kHtlsBXjpNZq2z0PL+IiJBOMC5/4tZAKYg9CHic1RB5EcC2ryaAUghoFLDHUvUUZ88 ogpDXNvgU8vgXdbA4SmZAOutaUpHCQh+gsO29oHDOLbkB/6kNeY65lfZ9VP93kD5AvL+R2d8e siegcbY/kpyO6VV8Qitggz/fc5XYNlF9KFOrfVLYLOTcByuwP70raydU1byVX1CqyPn1YC0eP a1eTJzpSa1BE1N2xk7EM37V5GNp4l78Xq8yAMQc4L2Urd+aIVTY30xhD62OjOKbP7fvqfhpyG VyHRAzAAUh7XnB1k7jTpa6FBvoinox91y2fAiAH1OS772OArI4= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 2 Sep 2017 11:28:55 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/i2c/adv7604.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 660bacb8f7d9..cc693ef71f33 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -3319,7 +3319,5 @@ static int adv76xx_probe(struct i2c_client *client, - if (!state) { - v4l_err(client, "Could not allocate adv76xx_state memory!\n"); + if (!state) return -ENOMEM; - } state->i2c_clients[ADV76XX_PAGE_IO] = client;