]> git.baikalelectronics.ru Git - kernel.git/commit
hwspinlock: Fix incorrect return pointers
authorBaolin Wang <baolin.wang@linaro.org>
Thu, 28 Jun 2018 02:32:21 +0000 (10:32 +0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 31 Jul 2018 03:54:51 +0000 (20:54 -0700)
commitcba9ba78649524d0261930c81da6416ae98db5a9
treec34af11c5e0a134259a63c3ae10f56203dc21e31
parentc4e1f630b04d5d808c98aa5e5b0bd7e785965dc4
hwspinlock: Fix incorrect return pointers

The commit 9901d6193241 ("hwspinlock: Add devm_xxx() APIs to request/free
hwlock") introduces one bug, that will return one error pointer if failed
to request one hwlock, but we expect NULL pointer on error for consumers.
This patch will fix this issue.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/hwspinlock/hwspinlock_core.c