From: Stephen Hemminger Date: Wed, 16 Jan 2013 18:05:32 +0000 (-0800) Subject: uio-howto: example bug X-Git-Tag: firefly_0821_release~3680^2~1077^2~108 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=93ce83b6e0ffe8d48dae46bc0983dd3f01ec7e32;p=firefly-linux-kernel-4.4.55.git uio-howto: example bug Bug in demo program, checking wrong return value Signed-off-by: Stephen Hemminger Cc: "Hans J. Koch" Signed-off-by: Greg Kroah-Hartman --- diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl index ddb05e98af0d..95618159e29b 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl @@ -984,7 +984,7 @@ int main() return errno; } configfd = open("/sys/class/uio/uio0/device/config", O_RDWR); - if (uiofd < 0) { + if (configfd < 0) { perror("config open:"); return errno; }