staging: ks7010: refactor ks_wlan_set_encode function
This commit refactors ks_wlan_set_encode function to improve readability. It just removes level indentation in some paths as well as removes not needed conditions paths which was checked before. Changes are as follows: - (dwrq->length > MAX_KEY_SIZE) check has been moved to the top. - extra check about (dwrq->length > 0) inside an if block where that was the condition to enter inside it has been removed. - (dwrq->flags & IW_ENCODE_NOKEY) check has been turned to avoid one level indentation. - extra check (index >= 0) && (index < 4) has been removed. In the top of the file invalid index values are being checked so it has no sense to check that again. - remove commented line. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment