greybus: loopback: ensure count decrement happens before sysfs_remove_groups
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Mon, 14 Sep 2015 09:48:39 +0000 (10:48 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 15 Sep 2015 04:35:58 +0000 (21:35 -0700)
commit6de00a5f32e09b58879175f2942ebeac699d3534
treea525e6f858503f1a351dc72261f4f2c86b478c7e
parent8552ca0f3634bf6aaf8f752fb9a73652326117eb
greybus: loopback: ensure count decrement happens before sysfs_remove_groups

This patches fixes a case where gb_dev.count is decremented too late in the
exit() routine.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/loopback.c