staging: ks7010: refactor ks_wlan_set_rx_gain function
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Thu, 19 Apr 2018 05:08:00 +0000 (07:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 12:32:05 +0000 (14:32 +0200)
commit6cb3e6062bcae0d841188d59091c6720ff8981c3
treea924cddf8a5532c37801d7dea8c08bccc697d98e
parent9dbeb16aab70af79ab853e5237d23c7a24b8d820
staging: ks7010: refactor ks_wlan_set_rx_gain function

This commit refactors ks_wlan_set_rx_gain function to
improve readability:
    - error condition is handling the error to avoid an 'else'
    - ternary operator is used to clean if-else block assignment.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c