usb: misc: ftdi-elan: fix duplicated code for different branches
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Sun, 13 Aug 2017 01:12:32 +0000 (20:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 09:17:58 +0000 (11:17 +0200)
commitd527d1ea5d12aafbd0373b5e6547464c370ea18c
treeeda271803ef21635a71e39dbb7afc2daaf30e35c
parented62ca2f4f51c17841ea39d98c0c409cb53a3e10
usb: misc: ftdi-elan: fix duplicated code for different branches

Refactor code in order to avoid identical code for different branches.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/ftdi-elan.c