Skip to content

Commit

Permalink
umc-bus.c: fix usage of device_trylock
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Bruno Morelli <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Claudio Scordino authored and gregkh committed Oct 25, 2012
1 parent 6f60291 commit b717727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/uwb/umc-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b717727

Please sign in to comment.