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>
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index ddb05e9..9561815 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -984,7 +984,7 @@
return errno;
}
configfd = open("/sys/class/uio/uio0/device/config", O_RDWR);
- if (uiofd < 0) {
+ if (configfd < 0) {
perror("config open:");
return errno;
}