drivers/cxl: suspected null pointer dereference in core/bus.c

From: YE Chengfeng
Date: Wed Oct 27 2021 - 07:35:35 EST


Hi,

https://github.com/torvalds/linux/blob/master/drivers/cxl/core/bus.c#L98

We notice that in multiple call sites, the return pointer of to_cxl_decoder is not null-checked, could it be a potential null-pointer-dereference problem?

This is detected by our experimental static analysis tool, it could be false positive, we manually check and report those we think may be true issues. Would you like to have a look at them?

Thanks so much,
Chengfeng