From patchwork Tue Nov 10 20:40:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 7592261 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 818B49F392 for ; Tue, 10 Nov 2015 20:50:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE46C20605 for ; Tue, 10 Nov 2015 20:50:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 79185205EB for ; Tue, 10 Nov 2015 20:50:09 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 50AF826597A; Tue, 10 Nov 2015 21:50:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DDEF426570B; Tue, 10 Nov 2015 21:47:20 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id DE5F52652E9; Tue, 10 Nov 2015 21:47:19 +0100 (CET) Received: from resqmta-po-02v.sys.comcast.net (resqmta-po-02v.sys.comcast.net [96.114.154.161]) by alsa0.perex.cz (Postfix) with ESMTP id 6535326531B for ; Tue, 10 Nov 2015 21:47:00 +0100 (CET) Received: from resomta-po-08v.sys.comcast.net ([96.114.154.232]) by resqmta-po-02v.sys.comcast.net with comcast id fwmw1r00B516pyw01wmzaG; Tue, 10 Nov 2015 20:46:59 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-08v.sys.comcast.net with comcast id fwmv1r0051LXgTt01wmvq5; Tue, 10 Nov 2015 20:46:59 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 6B1509F37B; Tue, 10 Nov 2015 13:40:56 -0700 (MST) From: Shuah Khan To: mchehab@osg.samsung.com, tiwai@suse.de, perex@perex.cz, chehabrafael@gmail.com, hans.verkuil@cisco.com, prabhakar.csengg@gmail.com, chris.j.arges@canonical.com Date: Tue, 10 Nov 2015 13:40:49 -0700 Message-Id: <296cd8810aa89866df6a8c1d97e228047b1072cf.1447184001.git.shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1447188419; bh=Cay01tJUGXCBb5SWjQy1azRD9PEGK6dfMltO0Mp3OSI=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=FIbAUcrwA1NnjBEGY3oZ+zgKqwTDz/Mum3XMJxJh+2KalCl8PtLUjGXREsK8sGmvs TAmhxwCBRdt8a+qsICjPgeXtCHYhI30sGgm+wkzLW3Km9v4UHbDBxKyumHAmZIL+u0 F6eX9nbj8mxauG+6BZusRgKkYnSOiKA+Sr9/y0nq1Nl8CwgCdCVTuZZpXjFchl0TGl VelUWnKj8Ohfit+8KVkMvqo9vhP5va7gVmLdgHC8Nfq71mdJiKZGi1kVf5vzqYpLOH qX+5tTqx+1Y2gTOEMxkHJHTH61pfNgeT5a0ZVvpq3ogkBanBCVGDV46JUcYTyrlhHi CANQdJDDhauhg== Cc: alsa-devel@alsa-project.org, Shuah Khan , linux-media@vger.kernel.org Subject: [alsa-devel] [PATCH MC Next Gen v3 6/6] media: au0828-core fix ignoring return value errors X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the ignoring return value errors found during kbuild bot compile test. drivers/media/usb/au0828/au0828-core.c:298:5: warning: ignoring return value of 'media_create_pad_link', declared with attribute warn_unused_result [-Wunused-result] drivers/media/usb/au0828/au0828-core.c:356:2: warning: ignoring return value of 'media_device_register_entity_notify', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Shuah Khan --- drivers/media/usb/au0828/au0828-core.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 3ef6fee..5b595a6 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -299,15 +299,20 @@ void au0828_create_media_graph(struct media_entity *new, void *notify_data) if (!tuner) break; - media_create_pad_link(ent, 0, tuner, - TUNER_PAD_RF_INPUT, - MEDIA_LNK_FL_ENABLED); + ret = media_create_pad_link(ent, 0, tuner, + TUNER_PAD_RF_INPUT, + MEDIA_LNK_FL_ENABLED); + if (ret) + pr_err("Create pad link err %d\n", ret); break; case AU0828_VMUX_COMPOSITE: case AU0828_VMUX_SVIDEO: default: /* AU0828_VMUX_DEBUG */ /* FIXME: fix the decoder PAD */ - media_create_pad_link(ent, 0, decoder, 0, 0); + ret = media_create_pad_link(ent, 0, decoder, + 0, 0); + if (ret) + pr_err("Create pad link err %d\n", ret); break; } } @@ -504,7 +509,13 @@ static void au0828_media_device_register(struct au0828_dev *dev, /* register entity_notify callback */ dev->entity_notify.notify_data = (void *) dev; dev->entity_notify.notify = au0828_create_media_graph; - media_device_register_entity_notify(mdev, &dev->entity_notify); + ret = media_device_register_entity_notify(mdev, &dev->entity_notify); + if (ret) { + dev_err(&udev->dev, + "Couldn't register entity_notify handler. Error: %d\n", + ret); + return; + } /* set enable_source */ mdev->source_priv = (void *) dev;