diff options
-rw-r--r-- | drivers/hwspinlock/hwspinlock_core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c index e16d648c30f3..2bad40d42210 100644 --- a/drivers/hwspinlock/hwspinlock_core.c +++ b/drivers/hwspinlock/hwspinlock_core.c | |||
@@ -877,10 +877,10 @@ struct hwspinlock *devm_hwspin_lock_request(struct device *dev) | |||
877 | 877 | ||
878 | ptr = devres_alloc(devm_hwspin_lock_release, sizeof(*ptr), GFP_KERNEL); | 878 | ptr = devres_alloc(devm_hwspin_lock_release, sizeof(*ptr), GFP_KERNEL); |
879 | if (!ptr) | 879 | if (!ptr) |
880 | return ERR_PTR(-ENOMEM); | 880 | return NULL; |
881 | 881 | ||
882 | hwlock = hwspin_lock_request(); | 882 | hwlock = hwspin_lock_request(); |
883 | if (!IS_ERR(hwlock)) { | 883 | if (hwlock) { |
884 | *ptr = hwlock; | 884 | *ptr = hwlock; |
885 | devres_add(dev, ptr); | 885 | devres_add(dev, ptr); |
886 | } else { | 886 | } else { |
@@ -913,10 +913,10 @@ struct hwspinlock *devm_hwspin_lock_request_specific(struct device *dev, | |||
913 | 913 | ||
914 | ptr = devres_alloc(devm_hwspin_lock_release, sizeof(*ptr), GFP_KERNEL); | 914 | ptr = devres_alloc(devm_hwspin_lock_release, sizeof(*ptr), GFP_KERNEL); |
915 | if (!ptr) | 915 | if (!ptr) |
916 | return ERR_PTR(-ENOMEM); | 916 | return NULL; |
917 | 917 | ||
918 | hwlock = hwspin_lock_request_specific(id); | 918 | hwlock = hwspin_lock_request_specific(id); |
919 | if (!IS_ERR(hwlock)) { | 919 | if (hwlock) { |
920 | *ptr = hwlock; | 920 | *ptr = hwlock; |
921 | devres_add(dev, ptr); | 921 | devres_add(dev, ptr); |
922 | } else { | 922 | } else { |