From patchwork Sat Sep 16 08:40:26 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: 9954153 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 84767601C0 for ; Sat, 16 Sep 2017 08:41:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E12A2947F for ; Sat, 16 Sep 2017 08:41:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 617EF29494; Sat, 16 Sep 2017 08:41:20 +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 58B7829489 for ; Sat, 16 Sep 2017 08:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751209AbdIPIk6 (ORCPT ); Sat, 16 Sep 2017 04:40:58 -0400 Received: from mout.web.de ([212.227.15.3]:56472 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbdIPIk5 (ORCPT ); Sat, 16 Sep 2017 04:40:57 -0400 Received: from [192.168.1.2] ([78.48.47.134]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lto05-1dRg5X13G1-011AZx; Sat, 16 Sep 2017 10:40:50 +0200 To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] [media] Maxi Radio: Delete an error message for a failed memory allocation in maxiradio_probe() Message-ID: <2c0d1f34-cdb0-f1c0-7243-4e80ad89af6a@users.sourceforge.net> Date: Sat, 16 Sep 2017 10:40:26 +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:BBBx0KFVLxdd6LB5Yl4pjgVqAI7QjMgCCmqhI4JbM1ENi3IyXaj /mT9+S7x7SGoGO6344aOjAz/3MvCqCn35qo6JGVeOjjau4z+HmZ/uN0p6NkXwX1+txU2rFT Z27ZySzGSOjSKx6AtYU37mrQd9awe0eLHuq7RYJxDkECuwkG4cg3NZqisXGqAOqxutenAfY mZ+WT8Qbf4HUCNmnGbXNg== X-UI-Out-Filterresults: notjunk:1; V01:K0:mLCtEAuf0+c=:QXUsEabxIlzcSETWu3XM2E szx7ABKPFX/XKEZu/ccFfKFnUGCrfjbinUZFHmvS25r+O8TwnlwPFj3VtQ+E+QVAqwVVbtzs2 gwUmnKtN6a3eY9G3/VCGk9GSl9ZW6cH+ONlGxdjTNikH7HsYIQzkrbPSrNPajmNVKSlOEcKgd i+MRVfEwO7WP4Ll3dtVJgE1zviwsa9b0T8v6O6Wi1TWUIDKWbTg/sxfJip2dfgSWw/qU4PFNW G7NxLd1BnS5pryZ4RxByhVx4HE0TVEFVDW083LVqk7e+uf2GeXrWVb/J8u6Q6+zzwyITpZr+/ ssg9LxcBtx0bj6HZTI7X6GF3auv+fsxSh0m/+ZFjXqDOB82Kz/kbJys9IRu/kOC5y5ge5u8yC TlYNrmV89nZXnIdkKNc8/RM6Bu7z0SarX1F2PoaiIg1FNsVRDM4kS0i7qteCOClShXjRpWQpi XRqjhiAIW4un52xwCiJKGCc6RWdV28qHMeUvzmJZDzwrhYD9fw2Bhp41oomY81ETtXj72XyFz jdizVPe/F0Kx6l6bLMgzid3a+gsjbg8M/N+1bPxtqkOX2e3kq2tlEqhDcelDKsp41hsDPCGwz w3Pi7VTrgS5d1qwRihaQDCkfdojHt4s+90zhcqXbF8iDct5aGWzzaNqiUSoZLlr1IXw4reS6O 2PK94llJmmrPsxUJBZM2oGZ4tRxvLYUwVaMmeBZ8dmAqqsy/2/6rmIBBcSigCQmy6/gQlENa8 2sHIm48GbzHeTbTQhgH5GsxL4ZUs1gHTFQXBZewdFfEF46T4shcC6Mv7zU/bnH0ggjmGbAnMh SVp1xN5GhMBZwUdPLHym2FydFB9gXTdQqnMlKrWeL8FwtmLLMM= 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: Sat, 16 Sep 2017 10:15:29 +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/radio/radio-maxiradio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index 3aa5ad391581..995bdc7ff4e6 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c @@ -125,7 +125,5 @@ static int maxiradio_probe(struct pci_dev *pdev, - if (dev == NULL) { - dev_err(&pdev->dev, "not enough memory\n"); + if (!dev) return -ENOMEM; - } v4l2_dev = &dev->v4l2_dev; v4l2_device_set_name(v4l2_dev, "maxiradio", &maxiradio_instance);