• Alexander Viro's avatar
    [PATCH] usx2y cleanups and fixes · 8df01d97
    Alexander Viro authored
    Sigh...
    	a) mixing of userland and kernel pointers is bad
    	b) so's not checking result of kmalloc()
    	c) so's not checking result of copy_from_user()
    	d) use of do { .... break; ... break; ... } while(0); is *highly*
    unidiomatic.  Do not confuse kernel with IOCCC, please. And if you have
    religious aversion to multiple return statements in a function, at least
    learn the reasons why it is frowned upon in many situations.  Hint: they
    all apply to use of break in that manner.
    	e) 0 instead of NULL
    Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    8df01d97
usX2Yhwdep.c 7.88 KB