From patchwork Mon Sep 4 20:05:54 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: 9937569 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 C2D856035F for ; Mon, 4 Sep 2017 20:06:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B44A3287B4 for ; Mon, 4 Sep 2017 20:06:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6DC8287EB; Mon, 4 Sep 2017 20:06:56 +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=unavailable 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 4EBA9287B4 for ; Mon, 4 Sep 2017 20:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754045AbdIDUGN (ORCPT ); Mon, 4 Sep 2017 16:06:13 -0400 Received: from mout.web.de ([212.227.17.12]:59940 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754185AbdIDUGC (ORCPT ); Mon, 4 Sep 2017 16:06:02 -0400 Received: from [192.168.1.2] ([78.48.84.177]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lvjiy-1dPYWF3GzE-017Vru; Mon, 04 Sep 2017 22:05:56 +0200 Subject: [PATCH 1/6] [media] atmel-isc: Delete an error message for a failed memory allocation in isc_formats_init() From: SF Markus Elfring To: linux-media@vger.kernel.org, Ludovic Desroches , Mauro Carvalho Chehab , Songjun Wu Cc: LKML , kernel-janitors@vger.kernel.org References: <88d0739c-fdc1-9d7d-fe53-b7c2eeed1849@users.sourceforge.net> Message-ID: Date: Mon, 4 Sep 2017 22:05:54 +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: <88d0739c-fdc1-9d7d-fe53-b7c2eeed1849@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:smB18cNmT7//g/rUbx8aTFyi4GDB+g+8rMtKnPu/a91VvUjYbBO b4cpW+2xlk/+scfgktknU4Q1KQLq0vyxIknvyyhdpJOPtRgu6n1MvE/90JafMykpR1LYbds jETcq4TZXtUkqwA+3SDd/d+bnJ53pZmaj/eclZYAugvHoDOUi+aQE53cYPFUBLnyqZvfKws fKH/ST5KY/7PC2kjrMduA== X-UI-Out-Filterresults: notjunk:1; V01:K0:d7igjXUiZag=:PUdwtP/KKTnTLm8TAWaPoN s6u+kLc0Oa3jzFrNVbsnce2GUalHwyEvoEsjqpHoMlbkJzrEWJjE8AOpZv1B3h5Nq6ZyGq7ld 4zNP1ZW2r8bto/SSUFxYd77lSZUTIJWulFaJT5adcVB32FOolFkEd86E4yYYdGSv+dwe23JC9 j3O8TjPqsriBTuxVkHddaQCzvOqUdMH2gaWs4PjSwrZIr46TMWTReDwN77nqR79GUpf8XDAKd p0yL8zzFIrJMmwgA9AQvZ2NNj7zh7ssFnY6DoSb9Bca4JRaaYzCRde9cnHTxAa1Axw0V2XW61 m4VZ4+l/NA6RfMwjfj/9ixSCOtImIvz3HjQI9/8S2s4SoM+PtOI0tJYR68Kv85unAw7MonCBZ 6fL/fT9U0x7gnNXYJM+CfjTHwq7HXhfRdxlMiDRNmzZ913tphVrPXOJTYcxE8/MevgQLjtTSU GapFNVhrhSCAOj9QKvQGbR2CQ8mmRjZO/ZGyp7x1+qhE292UBeQiIWdSNdxmq61R422vMjFDq KilWVzArnlED5o2OzCYAE8q/TKuMNpP/ZCUt/2ojocsys7L54oFMGIGu5qEO1Vw7EJ6RdoQ7m divYB9a7ExoNM4VOxR6+oAOI9Ss4fb76XpSpVIidXIDLUkoCKLJqEmfttIALRd0XozDbppuMJ SSKy5CeVZ1xtTyM9F+pE2baG0oFsEZ/GE2YmsMST1jQS5SlPFZicncgOmxKMKQa4ginc5/SRX QQkqanoP7sRwz9JOItvh7BtcKK1RBhbkJuEqWb7hPujx5ia7ffQEI+qbjNdzPos+CK0e6f9C+ NvuT1tbuFIBAvTcZlQyT8wsUQ7U0uSoc6xep9MBrnbH6sZCQBg= 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: Mon, 4 Sep 2017 20:33:58 +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/platform/atmel/atmel-isc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index d4df3d4ccd85..f1e635edef72 100644 --- a/drivers/media/platform/atmel/atmel-isc.c +++ b/drivers/media/platform/atmel/atmel-isc.c @@ -1510,7 +1510,5 @@ static int isc_formats_init(struct isc_device *isc) - if (!isc->user_formats) { - v4l2_err(&isc->v4l2_dev, "could not allocate memory\n"); + if (!isc->user_formats) return -ENOMEM; - } fmt = &isc_formats[0]; for (i = 0, j = 0; i < ARRAY_SIZE(isc_formats); i++) {