]> git.ipfire.org Git - thirdparty/linux.git/commit
phy: eswin: Fix incorrect error check in probe()
authorYulin Lu <luyulin@eswincomputing.com>
Mon, 13 Apr 2026 07:00:33 +0000 (15:00 +0800)
committerVinod Koul <vkoul@kernel.org>
Sun, 10 May 2026 11:53:41 +0000 (17:23 +0530)
commitc2cd08e8f150738515c8df415ad7ecfa3d38124a
treed5d40af40ce009bf480909e813c34b28e7d7fe9b
parent80305760d7a55b884fb9023c490b75568d1ea0b1
phy: eswin: Fix incorrect error check in probe()

devm_ioremap() returns NULL on failure, not an ERR_PTR.
Using IS_ERR() to check the return value is incorrect.

Fix this by checking for NULL and returning -ENOMEM.

Fixes: 67ee9ccaa34a ("phy: eswin: Create eswin directory and add EIC7700 SATA PHY driver")
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/linux-phy/adjNbuWoc1B-3Ok1@stanley.mountain/
Signed-off-by: Yulin Lu <luyulin@eswincomputing.com>
Link: https://patch.msgid.link/20260413070033.128-1-luyulin@eswincomputing.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/eswin/phy-eic7700-sata.c