From patchwork Sun Sep 17 09:50:20 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: 9954719 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 5BCB960208 for ; Sun, 17 Sep 2017 09:50:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38BE428515 for ; Sun, 17 Sep 2017 09:50:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CB73286E5; Sun, 17 Sep 2017 09:50:59 +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 E9E4028515 for ; Sun, 17 Sep 2017 09:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751306AbdIQJuo (ORCPT ); Sun, 17 Sep 2017 05:50:44 -0400 Received: from mout.web.de ([212.227.17.11]:64088 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186AbdIQJun (ORCPT ); Sun, 17 Sep 2017 05:50:43 -0400 Received: from [192.168.1.2] ([77.181.201.34]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M3k8j-1dcGLf2tvd-00rKmj; Sun, 17 Sep 2017 11:50:22 +0200 To: linux-media@vger.kernel.org, "Gustavo A. R. Silva" , Laurent Pinchart , Mauro Carvalho Chehab , Sakari Ailus , Shuah Khan Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] [media] au0828: Delete an error message for a failed memory allocation in au0828_usb_probe() Message-ID: <0c29dc8f-d21a-911f-28db-780206061d6f@users.sourceforge.net> Date: Sun, 17 Sep 2017 11:50:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:L+wupRq8Q0m7IL3MK+C/kahet9agw5hsCXNONxUE3ZS9m6zBQ/+ 8bim7DYFuo7Gb30HKDxRXtfgFwmm95UeyS16D52G00B5wHmQZLEFgzF59y5Q+BBneNl9lZM /tFvxuqLf59RZKDxur44okZW5ttf221XYlZGlppeTcEsMHbMjqJ43mRRSZXESWy9CK8K/Y9 kg5sB2iqxGs4X2l8hHGNA== X-UI-Out-Filterresults: notjunk:1; V01:K0:ENpgOwoR6pE=:3ETXvURGaeOLlo49fSe5qY bVaI6YLzyTIa742Tsv43GlZ0cVJPfeQixdqE4vYyVoklQ502CXQ+A2xkN0Q2Crs8zCIpa6hTG ohX0DHmobZlCQMZhDzZ55l0SJzWJ/0eYqeU6fzWIOeeIzSh7z85SXDm7L0nN7hrDpS9OtC9i3 tZCsYiqEG6VAKKCWWAhoYKd9Wr+g43Iad51189Y+jR3zxFwD7jnY/SZzrZ+F1hO6iNPlhVAJI AaQHJcFyXer25cjE1LdAQN+wu2l/OHYWxvvPPrmJ7CoQ1DRlxJe3SJRcTBp/kc6nXjQeKzvFp ftjByMRnEHqPmoZWrmtw1VK1D+K7hzeyi6s1NyauoWejtP+59lMlKMOyOBQ1Y9awXXi3DuC3+ p7yFvZIH9dFtUnWTKqp/nbyCT2tY1sNOtxzMehVT0pgg0HAmwee/TMTag2kmwNWz2/uzaZfbv leUrE3hfGu7I4GEDm73rpfl87ZzYyC7FG9cm3C3BuMC9hixeYZI45pDL25AgZJ/iHF8r0TyPZ ise6jM+imtZmLQhTTdS0kCII5nlguactlsg8+7HhEp7tRxiL/+t0H9j7NxuX2UYu5ojH+WPvH HEwgG8hUMQ+jtQcThaK473zvVBzUCUI8AlLKE3BajJcRiU/isKF5QeIDapJFe9a4E/1sFgGA/ wlj0IoEXAvfegQYNzbSYdtpHfTjbnMQORFcrgifnvd0xRoiuqpKb2b65zxDopbhnRwhW6eBJw wQ8RsFP0HbZ1ABjTel8kBfVhgUynTcppprIC2O62hbufkqsuUw4Zh+G4g22uFvz0u67spYIP8 hUBueftSOc7mxE2l1ML4JT1xYwgaWhQXHGnF6G4GiC0oO3MLTQ= 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, 17 Sep 2017 11:40:31 +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/usb/au0828/au0828-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index cd363a2100d4..9c5c05c90e15 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -583,7 +583,5 @@ static int au0828_usb_probe(struct usb_interface *interface, - if (dev == NULL) { - pr_err("%s() Unable to allocate memory\n", __func__); + if (!dev) return -ENOMEM; - } mutex_init(&dev->lock); mutex_lock(&dev->lock);