From patchwork Sun Oct 9 19:58:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9368651 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 117876048F for ; Sun, 9 Oct 2016 19:59:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0068828B47 for ; Sun, 9 Oct 2016 19:59:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E982F28B4F; Sun, 9 Oct 2016 19:59:06 +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 7A2E328B47 for ; Sun, 9 Oct 2016 19:59:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751790AbcJIT6n (ORCPT ); Sun, 9 Oct 2016 15:58:43 -0400 Received: from mout.web.de ([212.227.17.12]:57910 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbcJIT6m (ORCPT ); Sun, 9 Oct 2016 15:58:42 -0400 Received: from [192.168.1.2] ([77.182.43.140]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0M8iH2-1bjP9R49fw-00CCZs; Sun, 09 Oct 2016 21:58:18 +0200 Subject: [PATCH 2/2] [media] blackfin-capture: Delete an error message for a failed memory allocation To: adi-buildroot-devel@lists.sourceforge.net, linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , "Lad, Prabhakar" , Scott Jiang References: Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Wolfram Sang From: SF Markus Elfring Message-ID: Date: Sun, 9 Oct 2016 21:58:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:4esuW+0zNcNnJod29ZFz4xA1z/e6oXMUMDOh6CPE8NoLCBE4I2x kH6P+y4ro3ajsTY8f/cwxDbgAiYHM6zCisOq5tkyixUyFpPIMEyR9K5Mj/kXWZhK6Dj9+NU KlzlINjB8yUj2w3jlTNeYBYWOXxOd7SOB1I8Tpfp7UB7lOeET/UdePJ9eUe+Q9MoUZfFrW/ bJsweZlpH675TJ1g8FTIw== X-UI-Out-Filterresults: notjunk:1; V01:K0:6T6I6yxtprw=:HvupKj4umyzsS+xnTs4TyT modGi2mU0PkkWjBZrW3/9cbHkoEzDvAwGvyupsDfVs/hERI1kklcd99Bc9TnIcseWfmYHCvWa Q939RWUcbe+bdqBGNV4FRiviEL4Hi9W4K0y6glJK4jSrD0Dr6zWoxcd3wQm1xYLEWcS6z4PHh HDF0pmgsdPLp49s8aasAmR4LaFqrSpgxsiWwARHPJtFA/k/LWL3I20MRxuPsYTi+IMbVro4m6 jQvsovL5fFS/Up6qBC+93hc7FZP6vhItXtSc79173Cn5Oj2uDVoXWW7b2QrjXpiF2RXrKsrAp f37hOtiVRjPb00by3rVQ8fOExBDVzL0MeUF9+ls3QwJNTnUeABQeNWSmQvipLnZ0vOiJAOG5P one3fS6JFQxEv25kmML+ryYVVrhLirEdHbnzQ9Bm8/MwgwYU7uccWQX09Nt7zrRr56SBmWgfQ pzR8cB6K0fplhV5//Tnt6Ti+etlyBkBA/RBCPNwIWgI18nYWzBsiyjRKCjdE8PGQclbFIsMTo Ev6nH+J4tiinYbaV4n74klpqlzm4Qv/yQnMjW2947z5lasWhdrX0qztmLL4Kwf7gmZZmgZTun dt5Lmqan8+uxCA1m+eJtDjhwE2OID2qICUG5L8h543I1APHUGYvGCOrUQYde3bLlQqUToECOB PAHSKXl8642tnhD1sEp1IyPZ+O0BU3Bj2+3KuTOQtqKBQBNnIRQOVaL8CygF9vQbCdWJQvOXw 1TpX1lInjfYwtCVb3DS+a+ozzAAXRonaqxoi0TlCkLqv2v8+QWJPtGUL/EuP0AbCufG9H1tEU vADCqad 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: Sun, 9 Oct 2016 21:30:18 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such a statement here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/media/platform/blackfin/bfin_capture.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c index c5e1043..2e6edc0 100644 --- a/drivers/media/platform/blackfin/bfin_capture.c +++ b/drivers/media/platform/blackfin/bfin_capture.c @@ -802,10 +802,8 @@ static int bcap_probe(struct platform_device *pdev) } bcap_dev = kzalloc(sizeof(*bcap_dev), GFP_KERNEL); - if (!bcap_dev) { - v4l2_err(pdev->dev.driver, "Unable to alloc bcap_dev\n"); + if (!bcap_dev) return -ENOMEM; - } bcap_dev->cfg = config;