Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

umc-bus.c: fix usage of device_trylock

Fix usage of device_trylock. It has the same semantics of mutex_trylock, so it
returns 1 if the lock has been acquired successfully.

Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Bruno Morelli <bruno@evidence.eu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Claudio Scordino and committed by
Greg Kroah-Hartman
b717727e 6f602912

+1 -1
+1 -1
drivers/uwb/umc-bus.c
··· 63 63 struct device *parent = umc->dev.parent; 64 64 int ret = 0; 65 65 66 - if (device_trylock(parent)) 66 + if (!device_trylock(parent)) 67 67 return -EAGAIN; 68 68 ret = device_for_each_child(parent, parent, umc_bus_pre_reset_helper); 69 69 if (ret >= 0)