[PATCH] uio-howto: example bug

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

 



Bug in demo program, checking wrong return value

Signed-off-by: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>

--- a/Documentation/DocBook/uio-howto.tmpl	2012-12-12 08:53:44.615986228 -0800
+++ b/Documentation/DocBook/uio-howto.tmpl	2013-01-16 10:03:05.577809560 -0800
@@ -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;
 	}
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux