]> git.hungrycats.org Git - linux/commit
[PATCH] usx2y cleanups and fixes
authorAlexander Viro <viro@www.linux.org.uk>
Tue, 31 Aug 2004 09:41:25 +0000 (02:41 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 31 Aug 2004 09:41:25 +0000 (02:41 -0700)
commit8df01d9797fb821f828db8a84c8162131a2c9bf3
tree4d600f01bfd26d846865680da6fb903df3a95eea
parentfef4f8b9ebaf895dc129d4ef88497ce1d802e31d
[PATCH] usx2y cleanups and fixes

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: Al Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/usb/usx2y/usX2Yhwdep.c
sound/usb/usx2y/usbusx2y.c
sound/usb/usx2y/usbusx2yaudio.c