OpenCloudOS-Kernel/drivers/cxl/core
Wan Jiabing 05e815539f cxl/core/port: Fix NULL but dereferenced coccicheck error
Fix the following coccicheck warning:
./drivers/cxl/core/port.c:913:21-24: ERROR: port is NULL but dereferenced.

The put_device() is only relevent in the is_cxl_root() case.

Fixes: 2703c16c75 ("cxl/core/port: Add switch port enumeration")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20220307094158.404882-1-wanjiabing@vivo.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2022-03-22 10:51:17 -07:00
..
Makefile cxl/core/hdm: Add CXL standard decoder enumeration to the core 2022-02-08 22:57:30 -08:00
core.h cxl/core/hdm: Add CXL standard decoder enumeration to the core 2022-02-08 22:57:30 -08:00
hdm.c cxl/core/port: Handle invalid decoders 2022-02-08 23:15:10 -08:00
mbox.c cxl/core: Convert to EXPORT_SYMBOL_NS_GPL 2021-11-15 11:02:59 -08:00
memdev.c cxl/mem: Add the cxl_mem driver 2022-02-08 22:57:32 -08:00
pci.c cxl/core/port: Remove @host argument for dport + decoder enumeration 2022-02-08 22:57:30 -08:00
pmem.c cxl/pmem: Introduce a find_cxl_root() helper 2022-02-08 22:57:29 -08:00
port.c cxl/core/port: Fix NULL but dereferenced coccicheck error 2022-03-22 10:51:17 -07:00
regs.c cxl/regs: Fix size of CXL Capability Header Register 2022-02-08 23:15:33 -08:00