From patchwork Mon Sep 4 20:10:01 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: 9937581 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 38A796035F for ; Mon, 4 Sep 2017 20:10:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BB472883B for ; Mon, 4 Sep 2017 20:10:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CCF528826; Mon, 4 Sep 2017 20:10:18 +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 BD96128831 for ; Mon, 4 Sep 2017 20:10:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754638AbdIDUKL (ORCPT ); Mon, 4 Sep 2017 16:10:11 -0400 Received: from mout.web.de ([212.227.17.12]:61495 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754075AbdIDUKJ (ORCPT ); Mon, 4 Sep 2017 16:10:09 -0400 Received: from [192.168.1.2] ([78.48.84.177]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lqleo-1dKYcS09Yo-00eKXo; Mon, 04 Sep 2017 22:10:02 +0200 Subject: [PATCH 4/6] [media] atmel-isi: Delete an error message for a failed memory allocation in two functions 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: <7eb22d47-956e-5712-33a5-d50aaf8684ec@users.sourceforge.net> Date: Mon, 4 Sep 2017 22:10:01 +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:LiX/bCgp02cjFHSglIRIAqf9jo9ubkAZsYJfJcoOj76SOfh5SCy ciPeyccJhzQbMdqNMt28bkRuMUHXFtr19voqkGaNN/95AoNo6GCGthMV8Ux44cYi5163Bud UAZWDQk5PlDllprDC8h7qD5kz8pXd0DvPRiHnjirAy8j0QxGb8yBBFV9mCpeA4HX6/J0KJ9 4BU3j5ZJ9jdQMHSO8f96g== X-UI-Out-Filterresults: notjunk:1; V01:K0:+gHUCQrg7+w=:VLoBt61bL+rqRLpqY9sf8v /UJfoGmzOo47JTXMEgIoJM68YQ/6PqGF1DhK2OHejJ6GFkuee9QO2NgXQHy4VDWjm9pyNhzRv Di1FblIfjq2IjRrH6FPkEopzLvhlZaVL/Wc46uxFjCMvrDSxc4j9Jm5/F9yUu8UAlTCD/lF+P GOiTyIGj6GlPDJBpHLgrJFTlIiJgOVhTJiWVysOhj9Ecy3DRyzwqUAxli9Kruoly3DWfbTudA wqGkBRI+Ux9YBya+lu0mbcTTqDP3MYkv90krOtbTZ7TeNRgqz+XdXtJ0ApkdFixTdITwxoRRJ wNv3a1CcmygLzPJbOvBRQB82dWyzacYiVWm9QI25jY7YLUJ/luRyLu3sQtn0dYZRvO84iNBpM fC42uwDm7+x6USu09e0dFkUO9D2mTxco0yF2pe+gwqD5jKlk+PZFACuxkmDEZOLNLxBbiJZCX wZralTXh6EaL6H1/1MyupqBHVVxtjmFA/SKthPgfUMDkIOHLxGXkKL6UxOxXtOAnesVedRx7d FOoMLMsv1koBgMa5tvWbAmQlZAAyVR72sSX+IIUH+klvdmz7zpI7fHIHECBek2ocYD8RTC2Qk oeuKI1XXQC5COvX+PgDxiSqWRdtJuU5ujglBFJmYSZHanamygzTsi20C2w5/Bv1L1g49HYMvC TA1T0sKKE9N7ILLYdyrP0CQmtfkJgRuVg5cG42EuzKlrVSX4hIIqTaMXhNEck3c8AD373IRQs pkfeIyYzTdaHkkKFFPDWv+tkTqzJLuQAlBcyYFnqMl4X5LLMYKFIg1iE1a3vjzO7bglWVCD+q tLokDGU0nzI7W/fkvc6oMA28QiM5YGj4gDn2URH3AcSPS7YRQY= 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 21:21:25 +0200 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/platform/atmel/atmel-isi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c index 891fa2505efa..154e9c39b64f 100644 --- a/drivers/media/platform/atmel/atmel-isi.c +++ b/drivers/media/platform/atmel/atmel-isi.c @@ -1041,7 +1041,5 @@ static int isi_formats_init(struct atmel_isi *isi) - if (!isi->user_formats) { - dev_err(isi->dev, "could not allocate memory\n"); + if (!isi->user_formats) return -ENOMEM; - } memcpy(isi->user_formats, isi_fmts, num_fmts * sizeof(struct isi_format *)); @@ -1179,7 +1177,5 @@ static int atmel_isi_probe(struct platform_device *pdev) - if (!isi) { - dev_err(&pdev->dev, "Can't allocate interface!\n"); + if (!isi) return -ENOMEM; - } isi->pclk = devm_clk_get(&pdev->dev, "isi_clk"); if (IS_ERR(isi->pclk))