staging: ks7010: avoid some if-else code in get_current_ap function
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Tue, 24 Apr 2018 13:49:50 +0000 (15:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 13:50:18 +0000 (15:50 +0200)
commit0ff7968d6a8d8293968e1be55a458f9d34a6dff4
tree1bde8379221d49718ab0b0e47ff61a6bb855138f
parent5dfd0cfeeee5440b242b2c8578fc41a09aa26430
staging: ks7010: avoid some if-else code in get_current_ap function

This commits avoid some if-else code extracting common code before
its use and making use of a new variable 'size' which is assigned
using a ternary operator. This improves readability.

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