regulator: core: fix race condition in regulator_put()