]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] ip2: fix double operator
authorAndrew Morton <akpm@osdl.org>
Thu, 18 Mar 2004 23:01:26 +0000 (15:01 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 18 Mar 2004 23:01:26 +0000 (15:01 -0800)
From: "Randy.Dunlap" <rddunlap@osdl.org>

This trivial patch fixes the bug #320:

http://bugme.osdl.org/show_bug.cgi?id=320

The additional comment:

http://bugme.osdl.org/show_bug.cgi?id=320#c1

Is wrong, because it will send the command twice.

We only want to see if the command got success, thus is not necessary
to test against < 0 (if the return value is not 1, we got a error).

Note that I'm using the function (bad) style.

drivers/char/ip2/i2lib.c

index 2da7545fe3d106a84c15b3da4e655552f6cf29e9..a886e954cae9bb2ec8891794e2750dd9dc035621 100644 (file)
@@ -1249,7 +1249,7 @@ i2RetryFlushOutput(i2ChanStrPtr pCh)
 
        }
        if ( old_flags & STOPFL_FLAG ) {
-               if ( 1 == i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL) > 0 ) {
+               if (1 == i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL)) {
                        old_flags = 0;  // Success - clear flags
                }