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: 7592161 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 04DD8BF90C for ; Tue, 10 Nov 2015 20:47:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2AC93205F5 for ; Tue, 10 Nov 2015 20:47:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3BE49205EB for ; Tue, 10 Nov 2015 20:47:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751535AbbKJUrB (ORCPT ); Tue, 10 Nov 2015 15:47:01 -0500 Received: from resqmta-po-05v.sys.comcast.net ([96.114.154.164]:46201 "EHLO resqmta-po-05v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751112AbbKJUq7 (ORCPT ); Tue, 10 Nov 2015 15:46:59 -0500 Received: from resomta-po-08v.sys.comcast.net ([96.114.154.232]) by resqmta-po-05v.sys.comcast.net with comcast id fwmw1r004516pyw01wmz5P; 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 Cc: Shuah Khan , linux-media@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH MC Next Gen v3 6/6] media: au0828-core fix ignoring return value errors 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=YVEqxJZGL9oAzM9sH+kKgduOd83mDy8GwUN0Saf5HxhbwWhASyeWrS6weN/CfKRYm 0dlZZF9auSIBbLAm9L/LLuATSVEG3YKqxUpNhYluxumawiXG82z42gcfK5Hc47cftn smnz8uewOARsm/ybLpPgFMRWz2NBXUg+rMoljIUzIJhIsMDsxgRSeAwntYXCewilKB xFmr03uK3R/FaCaBkpa6hIXXWTxm6lGBIPTIYiOvhOFaH7z3eLwnh0wCkXQy4IIrcQ R+83b8GQD0450PRqlLOX5vJjvC/Lx5ylhSbBgfkv1uNtKwB0+WjLkVyGiSvg8pD3Sn /MXiX138bT7GQ== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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;