Browse Source

uio-howto: example bug

Bug in demo program, checking wrong return value

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stephen Hemminger 12 years ago
parent
commit
93ce83b6e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Documentation/DocBook/uio-howto.tmpl

+ 1 - 1
Documentation/DocBook/uio-howto.tmpl

@@ -984,7 +984,7 @@ int main()
 		return errno;
 	}
 	configfd = open(&quot;/sys/class/uio/uio0/device/config&quot;, O_RDWR);
-	if (uiofd &lt; 0) {
+	if (configfd &lt; 0) {
 		perror(&quot;config open:&quot;);
 		return errno;
 	}