staging: ks7010: refactor LOCAL_EEPROM_SUM case in hostif_mib_get_confirm
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Fri, 4 May 2018 04:16:46 +0000 (06:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2018 01:58:41 +0000 (18:58 -0700)
commitd74d0899349221b4356545ba88e4d0882d049d2f
tree3e22e5270ccecc17058fc81f1487096ac931ec15
parent5089cd418962823ff3a1ed1a0ec6a7d764fac27b
staging: ks7010: refactor LOCAL_EEPROM_SUM case in hostif_mib_get_confirm

This commit simplify conditional paths in LOCAL_EEPROM_SUM case
inside hostif_mib_get_confirm function. It change logic to handle
invalid values first and assign good ones at the end if it is the
case.

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