Skip to content
Commit 91105ed6 authored by Wei Yongjun's avatar Wei Yongjun Committed by Philipp Zabel
Browse files

reset: mchp: sparx5: fix return value check in mchp_sparx5_map_io()



In case of error, the function devm_platform_get_and_ioremap_resource()
returns ERR_PTR() and never returns NULL. The NULL test in the return
value check should be replaced with IS_ERR().

Fixes: 453ed428 ("reset: mchp: sparx5: add switch reset driver")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210519141638.3052456-1-weiyongjun1@huawei.com


Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 747aeec9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment