hwspinlock: Fix incorrect return pointers
The commit 4f1acd75 ("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: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
Showing
想要评论请 注册 或 登录