staging: ks7010: invert conditional, reduce indentation
A number of functions have blocks of code guarded by an if statement. if (foo) { /* block of code */ } This can, on occasion, more succinctly be expressed as if (!foo) return /* block of code */ This change will mean a number of whitespace issues need to be addressed/fixed. The diff can be a little hard to read when there are multiple lines that are very similar (for example error return code). Splitting the indentation reduction and the whitespace fixes into two separate patches was not found to aid reading the diff. Therefor we fix the whitespace issues at the same time. We need to be very sure to not make any changes to the program logic, this is ensured by only doing what is stated - invert the conditional, fix whitespace. Invert if statement conditionals. Return if new conditional evaluates to true. Reduce level of indentation in subsequent code. Fix white space issues. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment