Commit 49d6e658 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Jiang
Browse files

cxl/region: Fix an ERR_PTR() vs NULL bug



The __cxl_decoder_detach() function is expected to return NULL on error
but this error path accidentally returns an error pointer.  It could
potentially lead to an error pointer dereference in the caller.  Change
it to return NULL.

Fixes: b3a88225 ("cxl/region: Consolidate cxl_decoder_kill_region() and cxl_region_detach()")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/7def7da0-326a-410d-8c92-718c8963c0a2@sabinyo.mountain


Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
parent 3796f298
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment