[PATCH 40/61] phy: Prefer IS_ERR_OR_NULL over manual NULL check
Philipp Hahn <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel |
|---|---|
| Message-ID | <20260310-b4-is_err_or_null-v1-40-bd63b656022d__49201.350721863$1773145204$gmane$org@avm.de> |
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL check. Change generated with coccinelle. To: Vinod Koul <[email protected]> To: Neil Armstrong <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Philipp Hahn <[email protected]> --- drivers/phy/phy-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 21aaf2f76e53eb1c63f1ffd2217f767c2dab5c3a..6416e9097caab56f7ba663777eba2c06291dffc5 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -699,7 +699,7 @@ EXPORT_SYMBOL_GPL(of_phy_get); */ void of_phy_put(struct phy *phy) { - if (!phy || IS_ERR(phy)) + if (IS_ERR_OR_NULL(phy)) return; mutex_lock(&phy->mutex); -- 2.43.0