From patchwork Fri Sep 8 20:51:35 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: 9945021 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 17010604D4 for ; Fri, 8 Sep 2017 20:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09DF5223B3 for ; Fri, 8 Sep 2017 20:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2DDB24B48; Fri, 8 Sep 2017 20:52:29 +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 A6ECA223B3 for ; Fri, 8 Sep 2017 20:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932590AbdIHUwP (ORCPT ); Fri, 8 Sep 2017 16:52:15 -0400 Received: from mout.web.de ([217.72.192.78]:56461 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932214AbdIHUwO (ORCPT ); Fri, 8 Sep 2017 16:52:14 -0400 Received: from [192.168.1.2] ([92.228.166.205]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MeBHO-1e6T3c2Q4E-00Pubt; Fri, 08 Sep 2017 22:51:38 +0200 Subject: [PATCH 1/3] [media] s5p-mfc: Delete an error message for a failed memory allocation in s5p_mfc_probe() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, Andrzej Hajda , Jeongtae Park , Kamil Debski , Kyungmin Park , Marek Szyprowski , Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org References: <482a6c92-a85e-0bcd-edf7-3c2f63ea74c5@users.sourceforge.net> Message-ID: Date: Fri, 8 Sep 2017 22:51:35 +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: <482a6c92-a85e-0bcd-edf7-3c2f63ea74c5@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:q74wgusNv3UFCzOEXj8qTg+BGkpa7xi45o8Zvt6gpimNCfCXJAv MlxM2saxSxK63o30Z5n1q4wmpT8Y7g46YjNCdRRSfUDHhSRrl+Ogmy1AFxeZX0fynpr9rK/ be85YreFMEANy1HcizxgGTYcBVULOCPBdAL4Opd4uDm2qX2TVngD2e4ryQs+gZRFCYSQhVr CYf87UB0oIK048T79I6Pw== X-UI-Out-Filterresults: notjunk:1; V01:K0:YxNla+iBiFs=:x5YeO/RWjYU2HOP0IJjaWm ywRlfuE5IPL6KtRA2lz+jwFHhGIydHW+GWAHt4l80IwUDBgntDeLex1v/oK0XGVEAQfbnRuNF G1TpoObC3QaKODa59lM8HiCxVzNx0upl63kUyAGKrYHUf+5U8cZeGEARkkP+4GrWuqbVRDX+c 1nM2epR/laI3M+uHCotZxGp89/entAxTbRDXaUFV1VZbRar6wtQ7uahmRkf6ATypozvFcADT4 HG5tufXVwufcY2HcccbDcbFKrZ03vi7KhUgR09V80UzrV/A2PMHPnllNzUQLAoWk3Bxd/A13y FqsIAl4bBIBG035o1x7FPpuzDD1pVagiBL4d6Memst3IQZMG6MV+KsjAdPW7Srdhv+zS7sfLk GAqI7VNsbVEhB/+BgKcSrkqiMkbS0jYBC3FipOgbrA8C81VG3LQ9PKjnDxlO442hg/J23WtW7 EhnTBxTZsPBJRxa3pbowrtNp9tpLTMWZj72+IjPPp3UOy9C7S2Q8Xj+o8AkfgFAZoJaUOQR+j ZcPW3r5KhQvfl4VGglvFwnQp7+Vv9oS2NlQ7iwxcq8DVjACXr9YNpZP0fIRjuslcq3f67hK8J miTAjuvPeZJp4FOP5eGJDVE4QKW95jOHHCrfuktfm7SfyVbKdvX7ZMuWVh5yVPcp0BgWhYyEi cIaJp7RV6jAp2x9P/HoEEO21K7APdHiyfGaugQxhIa97AIEM86oxQWUqhvNmimyUu2HX6dc0U ubs6WV90pulC/YXi7DCCFbOYMVL8wNHgtpa4C+oS8z+FawpYUTWgbxheHug5W1jKtJszU9/Yk +Pv9daHxCiN5sK9Z/8Y+AEiCFyTKb7/xUF+51t+W3TrAhtIYwA= 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: Fri, 8 Sep 2017 22:25:17 +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 Acked-by: Sylwester Nawrocki --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 1afde5021ca6..8af45d53846f 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1270,10 +1270,8 @@ static int s5p_mfc_probe(struct platform_device *pdev) pr_debug("%s++\n", __func__); dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&pdev->dev, "Not enough memory for MFC device\n"); + if (!dev) return -ENOMEM; - } spin_lock_init(&dev->irqlock); spin_lock_init(&dev->condlock);