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>
This commit is contained in:
Stephen Hemminger 2013-01-16 10:05:32 -08:00 committed by Greg Kroah-Hartman
parent 25c22d5bea
commit 93ce83b6e0

View file

@ -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;
}