From patchwork Thu Aug 25 14:08:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 1096592 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7PE8V8M016670 for ; Thu, 25 Aug 2011 14:09:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750934Ab1HYOJJ (ORCPT ); Thu, 25 Aug 2011 10:09:09 -0400 Received: from smtp-vbr2.xs4all.nl ([194.109.24.22]:3249 "EHLO smtp-vbr2.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752103Ab1HYOIn (ORCPT ); Thu, 25 Aug 2011 10:08:43 -0400 Received: from alastor.dyndns.org (215.80-203-102.nextgentel.com [80.203.102.215]) (authenticated bits=0) by smtp-vbr2.xs4all.nl (8.13.8/8.13.8) with ESMTP id p7PE8cU9044225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 25 Aug 2011 16:08:39 +0200 (CEST) (envelope-from hverkuil@xs4all.nl) Received: from localhost.localdomain (tschai.lan [192.168.1.10]) (Authenticated sender: hans) by alastor.dyndns.org (Postfix) with ESMTPSA id 84736168C00EC; Thu, 25 Aug 2011 16:08:37 +0200 (CEST) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [RFC PATCH 04/12] saa7146: fix compiler warning Date: Thu, 25 Aug 2011 16:08:27 +0200 Message-Id: <6d87d7fae9166b16990c5db200e61e3c4e82a9e6.1314281302.git.hans.verkuil@cisco.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1314281315-32366-1-git-send-email-hverkuil@xs4all.nl> References: <1314281315-32366-1-git-send-email-hverkuil@xs4all.nl> In-Reply-To: References: X-Virus-Scanned: by XS4ALL Virus Scanner Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 25 Aug 2011 14:09:23 +0000 (UTC) From: Hans Verkuil v4l-dvb-git/drivers/media/common/saa7146_video.c: In function 'video_close': v4l-dvb-git/drivers/media/common/saa7146_video.c:1350:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] Signed-off-by: Hans Verkuil --- drivers/media/common/saa7146_video.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 9aafa4e..77e232f 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c @@ -1347,18 +1347,14 @@ static void video_close(struct saa7146_dev *dev, struct file *file) struct saa7146_fh *fh = file->private_data; struct saa7146_vv *vv = dev->vv_data; struct videobuf_queue *q = &fh->video_q; - int err; - if (IS_CAPTURE_ACTIVE(fh) != 0) { - err = video_end(fh, file); - } else if (IS_OVERLAY_ACTIVE(fh) != 0) { - err = saa7146_stop_preview(fh); - } + if (IS_CAPTURE_ACTIVE(fh) != 0) + video_end(fh, file); + else if (IS_OVERLAY_ACTIVE(fh) != 0) + saa7146_stop_preview(fh); videobuf_stop(q); - /* hmm, why is this function declared void? */ - /* return err */ }