NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/41008: possible simple mistake of field check in video(9)



>Number:         41008
>Category:       kern
>Synopsis:       possible simple mistake of field check in video(9)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 13 20:30:00 +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);



Home | Main Index | Thread Index | Old Index