From patchwork Thu Oct 14 20:06:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Valdis_Kl=C4=93tnieks?= X-Patchwork-Id: 254341 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9EK7Zem024373 for ; Thu, 14 Oct 2010 20:07:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756008Ab0JNUGx (ORCPT ); Thu, 14 Oct 2010 16:06:53 -0400 Received: from lennier.cc.vt.edu ([198.82.162.213]:59937 "EHLO lennier.cc.vt.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756004Ab0JNUGw (ORCPT ); Thu, 14 Oct 2010 16:06:52 -0400 Received: from vivi.cc.vt.edu (vivi.cc.vt.edu [198.82.163.43]) by lennier.cc.vt.edu (8.13.8/8.13.8) with ESMTP id o9EK4beg028030; Thu, 14 Oct 2010 16:06:30 -0400 Received: from turing-police.cc.vt.edu (EHLO localhost) ([128.173.14.107]) by vivi.cc.vt.edu (MOS 4.1.8-GA FastPath queued) with ESMTP id NDI21940; Thu, 14 Oct 2010 16:06:30 -0400 (EDT) X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Andrew Morton , Hans Verkuil , Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: mmotm 2010-10-13 - GSPCA SPCA561 webcam driver broken In-Reply-To: Your message of "Wed, 13 Oct 2010 17:13:25 PDT." <201010140044.o9E0iuR3029069@imap1.linux-foundation.org> From: Valdis.Kletnieks@vt.edu References: <201010140044.o9E0iuR3029069@imap1.linux-foundation.org> Mime-Version: 1.0 Date: Thu, 14 Oct 2010 16:06:29 -0400 Message-ID: <5158.1287086789@localhost> X-Mirapoint-Received-SPF: 128.173.14.107 localhost Valdis.Kletnieks@vt.edu 2 pass X-Mirapoint-IP-Reputation: reputation=neutral-1, source=Fixed, refid=n/a, actions=MAILHURDLE SPF TAG X-Junkmail-Status: score=10/50, host=vivi.cc.vt.edu X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A020202.4CB762C6.012B,ss=1,fgs=0, ip=0.0.0.0, so=2009-09-22 00:05:22, dmn=2009-09-10 00:05:08, mode=single engine X-Junkmail-IWF: false 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.3 (demeter1.kernel.org [140.211.167.41]); Thu, 14 Oct 2010 20:07:35 +0000 (UTC) diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index d4a3532..f069c61 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c @@ -221,8 +221,8 @@ static long v4l2_ioctl(struct file *filp, unsigned int cmd, struct video_device *vdev = video_devdata(filp); int ret; - /* Allow ioctl to continue even if the device was unregistered. - Things like dequeueing buffers might still be useful. */ + if (!vdev->fops->ioctl) + return -ENOTTY; if (vdev->fops->unlocked_ioctl) { ret = vdev->fops->unlocked_ioctl(filp, cmd, arg); } else if (vdev->fops->ioctl) {