From b717727ef25d4b73f73e3666341c07a034f908a6 Mon Sep 17 00:00:00 2001 From: Claudio Scordino Date: Tue, 9 Oct 2012 12:21:17 +0200 Subject: [PATCH] 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 Signed-off-by: Bruno Morelli Signed-off-by: Greg Kroah-Hartman --- drivers/uwb/umc-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/uwb/umc-bus.c b/drivers/uwb/umc-bus.c index 82a84d53120f..5c5b3fc9088a 100644 --- a/drivers/uwb/umc-bus.c +++ b/drivers/uwb/umc-bus.c @@ -63,7 +63,7 @@ int umc_controller_reset(struct umc_dev *umc) struct device *parent = umc->dev.parent; int ret = 0; - if (device_trylock(parent)) + if (!device_trylock(parent)) return -EAGAIN; ret = device_for_each_child(parent, parent, umc_bus_pre_reset_helper); if (ret >= 0) -- 2.39.5