From patchwork Sun Sep 3 20:33:02 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: 9936567 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 00097603D7 for ; Sun, 3 Sep 2017 20:33:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E84342863D for ; Sun, 3 Sep 2017 20:33:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDFA0286B5; Sun, 3 Sep 2017 20:33:52 +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 9E0172863D for ; Sun, 3 Sep 2017 20:33:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752866AbdICUdO (ORCPT ); Sun, 3 Sep 2017 16:33:14 -0400 Received: from mout.web.de ([212.227.15.14]:60545 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbdICUdN (ORCPT ); Sun, 3 Sep 2017 16:33:13 -0400 Received: from [192.168.1.2] ([78.48.243.242]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LaqwS-1d4WKW0cP2-00kSxZ; Sun, 03 Sep 2017 22:33:04 +0200 Subject: [PATCH 3/7] [media] Hexium Gemini: Delete an error message for a failed memory allocation in hexium_attach() From: SF Markus Elfring To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net> Message-ID: <1c4c1193-be5a-1fc8-718e-373a45b66e2a@users.sourceforge.net> Date: Sun, 3 Sep 2017 22:33:02 +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: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:pbzg4csi4bJuUK6QdrMrDIjg+d1cHhXnVOjAwSYJxKEc+EJE37V wbm4oXR2x8dwkn8V7yBD0nFFD7S07jfFPfGRdKwJqlTkO3JdokwTE2280s4cGl3ZNdjpyX4 FTInXwuAhO+cHW0FeGDlSIhc1Sq/fzO8ChzsznSoNFhijadEki+3YJli5Q95zI1qreg0pTC LifYWPZILgwslzAvQFOPQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:W9bk58cN3lc=:JEFlh7OV6wbDPDpauU0eSg 6DBF45FZ5BxNiK3L91sM7NJ5fAX7OMNzgNOTzvLqW6dTN3c6SGPLZudm+OTLeSUe1NzJhEfMm w05vDCySW9xRVKCmhOg38UeMLRCNPAFtdsHZzXGINSt5/ZlelK6PZvx3N4wZElXzOKMQcYeoQ w+2yjx4VkvhZqGwBGP62G3Mjs3S4dbN4X++14Cghtfem+ESsWpCsJyEUQ/5NJAcSboYUtKVEf 2LKLEO0UsJ2+SZsCKMF1P7eQiWnkFok188twqFGkiADL01ZcjfnVFu4qH/2cLc10r1LP7BGa9 BjPDhT6ob0KGOY+MrJAr1gqpT36q3vU6FViE1bKFFk5hsu2NAS0Pd7FrnIO/fU+ShneLoF3Lg C3hrszmfetz3FsIpSC0spjvF7B5Ndih+tEA2Onkhk85RXSLrmx3w2/+zvs+ZEjPWWMysVON2R hCz9ooWLJAOmW/ZuywWH447D12jR/phyGvUDIw+vxkgHA0mKgRlysS8czV779VGy3UVwLnf/w mFXMFl3aEa/S3/Cc3zV0N0BxhH6n9rpIGqy374Ea7uAVNkvLbbf59q3ju8xY6TV8APJU/r53S mpVd8KJa7JAfSoZsI9Gy4B944K4QIXe5GO8zIeqc3Qbk7Cu4L+JlWq0m7UxU309lsxBstpxZT +12JMegQnKHxXxf0aBevbMn3df9jxYAXJVzSlpGqsRo9nVLHlOQSUwFHtmME4VQewGPab7tws R+fi2eW9BsedcyrBEM6WLp3WYrs5HVPvmf11HDKC6dMiOkKkqA/QdM/LnFkYFfS4dVjTq/Ukg Tnso15vkTIt1wBkyNYInJcZCfEGIrF2c9J5euaIwEKyvhQdXvc= 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, 3 Sep 2017 19:23:37 +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/pci/saa7146/hexium_gemini.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/saa7146/hexium_gemini.c b/drivers/media/pci/saa7146/hexium_gemini.c index c889ec9f8a5a..694b70fa3baf 100644 --- a/drivers/media/pci/saa7146/hexium_gemini.c +++ b/drivers/media/pci/saa7146/hexium_gemini.c @@ -264,7 +264,6 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d - if (NULL == hexium) { - pr_err("not enough kernel memory in hexium_attach()\n"); + if (!hexium) return -ENOMEM; - } + dev->ext_priv = hexium; /* enable i2c-port pins */