]> asedeno.scripts.mit.edu Git - linux.git/commit
soc: qcom: llcc-slice: Add error checks for API functions
authorJordan Crouse <jcrouse@codeaurora.org>
Fri, 5 Oct 2018 13:08:29 +0000 (18:38 +0530)
committerAndy Gross <andy.gross@linaro.org>
Wed, 14 Nov 2018 17:59:03 +0000 (09:59 -0800)
commite0f2cfeb59c81cbcfc7fbcb7ec0636020499813b
treefe997857155d9e83d67cf88e403879af6b3c8e24
parent8c1919a2b48f172bfb4db5aa93d5809dd26738b3
soc: qcom: llcc-slice: Add error checks for API functions

llcc_slice_getd can return a ERR_PTR code on failure. Add a IS_ERR_OR_NULL
check to subsequent API calls that use struct llcc_slice_desc to guard
against faults and to let the leaf drivers get away with safely using a
ERR_PTR() encoded "pointer" in the aftermath of a llcc_slice_getd error.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/llcc-slice.c