From patchwork Sun Sep 17 09:19:05 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: 9954689 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 F03496028A for ; Sun, 17 Sep 2017 09:19:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC2E92887D for ; Sun, 17 Sep 2017 09:19:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF50228A0E; Sun, 17 Sep 2017 09:19:40 +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 D43F82887D for ; Sun, 17 Sep 2017 09:19:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751365AbdIQJTT (ORCPT ); Sun, 17 Sep 2017 05:19:19 -0400 Received: from mout.web.de ([212.227.17.12]:64596 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbdIQJTR (ORCPT ); Sun, 17 Sep 2017 05:19:17 -0400 Received: from [192.168.1.2] ([77.181.201.34]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M3T5g-1dc7R3427c-00qyDm; Sun, 17 Sep 2017 11:19:06 +0200 Subject: [PATCH 1/2] [media] airspy: Delete an error message for a failed memory allocation in airspy_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Antti Palosaari , Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <6cb0e016-10c1-1336-a063-bf5c6f6b64dd@users.sourceforge.net> Date: Sun, 17 Sep 2017 11:19:05 +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: Content-Language: en-GB X-Provags-ID: V03:K0:HLTmv7KGwjKhkc5hDZq+/VK2RUS5tZy6EexMIljPcdIt4tDbnsq m3JaOQ36rppQc/FBvJLNzJewjm+uCZU/3iQmY+YiiRa//06FdR2ags25jQI2X55mc9FbToM z7xmEqZbA2Ac+IBxiChJDC6HsFIyg6Ec+Umcs7dtv3xaj2v0Aac+cu6plglbKs3fEDAleCp 97HY0YSbIJnaOHIzKxufA== X-UI-Out-Filterresults: notjunk:1; V01:K0:B34CaDHdvMs=:X4Nbp+BRyYmYmPVGFR1tLx qxFOF/lS9rlbiyHQP9kt6jfKOd1X8Z4rugDq58e1KTK+wAkdMeSjQsnn4aBGxiHn0K+pn+X2g M9qLQFQtJs6PEwFeTAzvdBUZYl9M97/5lKnPsv2NRRyT7MjTb7E68BWzqNnZ/VWh4oVZqQML4 SFdTP46dXUCsIF+AcpPEYhtlYLhnlz9c+NvihgbqkNcOFyJ6lc7K4O4J4x5w8pzn3lv1rwVTf AH1In1Pka1NOKSMtjvXwOefCQvYdT1+w75G+Mnit4B1ji45+mnJYpjYejTRaiSSP3tNL0WTRa xVyFlu4BcfEkortaa8WUCD3qbHzmReoiOgARKV9WvoiBi0y9iVW7H4dthL5OmvSZ/im6narV/ rZ/zhTeo+zk5Ee5FbBc7empSy9luGge1F/oDtJnv9RpX368Jo7JIkUqpYtvw/BVJBdmVCyy/7 iDeexd1a5v7BEZtSE4feLQ5+l7Rg7xrMYqp2+G8Ho7bVVfdki4AqcQDucUP56J9+K5cADXunj ZRuSCvY0WfTJCoFlH2h3Ls8VLC4n66WSOTsQFBn4sqFGmTcapxzHCdSvXbSFl/xSGIUuHPBHF 2a0RvQAwJ4oPVMkLdHjIqzfeSVwb+4uC1JpjeUfu9A5FykJpV3fv621zzqWH47gi1qt3wnX18 sIZQ9KlENdyOt8vnawMpvxUkljfzH+RcVe+uPFEO1aVOefdgwzLU2Q/8Loz2uLXqHz4lH3GuJ vVvyHZb2LmENENm02bUVxZcpb4Cxk7/5q47MzIXQ/LgBVFCTL4XpV18ibe7v7rkYOp/lEaALe UoQ2Buqr+fVQsBDaPQN0MqtkxtKxVbekaIsPL00NGwmYbFQASA= 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:00:09 +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/airspy/airspy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c index e70c9e2f3798..72b36dbcc0ba 100644 --- a/drivers/media/usb/airspy/airspy.c +++ b/drivers/media/usb/airspy/airspy.c @@ -985,7 +985,5 @@ static int airspy_probe(struct usb_interface *intf, - if (s == NULL) { - dev_err(&intf->dev, "Could not allocate memory for state\n"); + if (!s) return -ENOMEM; - } mutex_init(&s->v4l2_lock); mutex_init(&s->vb_queue_lock);