Re: [ATM] [UPDATE] unbalanced exit path in Forerunner HE he_init_one() (and an iphase patch too!)

From: David S. Miller (davem@redhat.com)
Date: Sat May 10 2003 - 09:02:34 EST


   From: chas williams <chas@locutus.cmf.nrl.navy.mil>
   Date: Sat, 10 May 2003 09:52:49 -0400

   In message <20030510062015.A21408@infradead.org>,Christoph Hellwig writes:
>kfree(NULL) if perfectly fine. Also please untangle all this if
>statements to two separate lines.
   
   but its ok for usb drivers?
   
Bad ugly code in one area of the kernel is not an excuse
for it in other areas :-)

Really, putting a statement on the same line as the if
test controlling it's execution is very unreadable. Most
people's eyes expect to see:

        if (test)
                IF_CODE_BLOCK

Whether it be one or more lines. I cannot count how many locking bugs
escaped for a long time because of utter shit like this:

        if (test) return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:33 EST