gpio: max7301: fix the race between chip addition and pins reconfiguration
gpio: max7301: fix the race between chip addition and pins reconfiguration

There is a small race and code ugliness in max7301: pins are reconfigured
after the chip is registered.  Swap these calls so that the device is
registered in correct state.

Also this fixes the comile-time warning about unchecked gpiochip_remove.

Signed-off-by: Dmitry Baryshkov <b6edad08270b2e4ffbcb0879e25a0e29a48c5275@gmail.com>
Cc: Juergen Beisert <57bd1dc7381d3733cde6fb7e91ae6e71bf62a424@pengutronix.de>
Cc: Guennadi Liakhovetski <50875182aae23d69ca7738697596f18a14e926fc@pengutronix.de>
Cc: Russell King <c2093e01fa868776d7876ac617ce6d2ac30cb904@arm.linux.org.uk>
Cc: David Brownell <e543181633fc0fc2787945ef377537d9112d0c96@pacbell.net>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas