NetBSD Problem Report #41008

From www@NetBSD.org  Fri Mar 13 20:25:57 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id C6FD063C200
	for <gnats-bugs@gnats.netbsd.org>; Fri, 13 Mar 2009 20:25:57 +0000 (UTC)
Message-Id: <20090313202557.40C5463C1DA@www.NetBSD.org>
Date: Fri, 13 Mar 2009 20:25:57 +0000 (UTC)
From: fukumoto@imasy.or.jp
Reply-To: fukumoto@imasy.or.jp
To: gnats-bugs@NetBSD.org
Subject: possible simple mistake of field check in video(9)
X-Send-Pr-Version: www-1.0

>Number:         41008
>Category:       kern
>Synopsis:       possible simple mistake of field check in video(9)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jmcneill
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 13 20:30:00 +0000 2009
>Closed-Date:    Wed Mar 18 13:36:06 +0000 2009
>Last-Modified:  Wed Mar 18 13:36:06 +0000 2009
>Originator:     fukumoto
>Release:        5.0 RC2
>Organization:
>Environment:
NetBSD kestrel 5.0_RC2 NetBSD 5.0_RC2 (Kestrel) #2: Sat Feb 28 10:21:16 JST 2009  fukumoto@kestrel:/u/src.netbsd5/sys/arch/amd64/compile/obj/Kestrel amd64

>Description:
video_set_format() is checking for hw->get_format, but
I think what it intended was hw->set_format.

>How-To-Repeat:

>Fix:
Index: video.c
===================================================================
RCS file: /cvsroot/src/sys/dev/video.c,v
retrieving revision 1.17.8.2
diff -u -u -r1.17.8.2 video.c
--- video.c	22 Jan 2009 23:21:19 -0000	1.17.8.2
+++ video.c	13 Mar 2009 20:23:37 -0000
@@ -760,7 +760,7 @@
 	int err;

 	hw = sc->hw_if;
-	if (hw->get_format == NULL)
+	if (hw->set_format == NULL)
 		return ENOTTY;

 	v4l2_format_to_video_format(fmt, &vfmt);

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->pending-pullups
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Sat, 14 Mar 2009 00:35:11 +0000
State-Changed-Why:
Pullup requested.
[pullup-5 #576] Correct consistency check in video(4) video_set_format()


Responsible-Changed-From-To: kern-bug-people->jmcneill
Responsible-Changed-By: jmcneill@NetBSD.org
Responsible-Changed-When: Sat, 14 Mar 2009 00:36:45 +0000
Responsible-Changed-Why:
Mine.


State-Changed-From-To: pending-pullups->closed
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Wed, 18 Mar 2009 13:36:06 +0000
State-Changed-Why:
Patch applied and pulled up to NetBSD 5.0, thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.