From: Fabien Dessenne Date: Fri, 8 Mar 2019 16:53:46 +0000 (+0100) Subject: hwspinlock: ignore disabled device X-Git-Tag: v5.3-rc1~54^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbd7330c9fd8ef00bf231ec7e57b0f05384f462d;p=thirdparty%2Fkernel%2Flinux.git hwspinlock: ignore disabled device Do not wait for hwspinlock device registration if it is not available for use. Acked-by: Suman Anna Signed-off-by: Fabien Dessenne Signed-off-by: Bjorn Andersson --- diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c index 2bad40d42210d..d806307f19c2c 100644 --- a/drivers/hwspinlock/hwspinlock_core.c +++ b/drivers/hwspinlock/hwspinlock_core.c @@ -333,6 +333,11 @@ int of_hwspin_lock_get_id(struct device_node *np, int index) if (ret) return ret; + if (!of_device_is_available(args.np)) { + ret = -ENOENT; + goto out; + } + /* Find the hwspinlock device: we need its base_id */ ret = -EPROBE_DEFER; rcu_read_lock();