projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3b3a87
)
net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code
author
Yu Liao
<liaoyu15@huawei.com>
Tue, 22 Aug 2023 02:14:55 +0000
(10:14 +0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Thu, 24 Aug 2023 01:57:30 +0000
(18:57 -0700)
Use the standard error pointer macro to shorten the code and simplify.
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Link:
https://lore.kernel.org/r/20230822021455.205101-2-liaoyu15@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/davicom/dm9051.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/davicom/dm9051.c
b/drivers/net/ethernet/davicom/dm9051.c
index 2caaf1e9f42fb7f9980a2e68dd67bebb11392c05..bcfe52c11804aa24924f0fd83bb40c04dc506026 100644
(file)
--- a/
drivers/net/ethernet/davicom/dm9051.c
+++ b/
drivers/net/ethernet/davicom/dm9051.c
@@
-1158,9
+1158,7
@@
static int dm9051_phy_connect(struct board_info *db)
db->phydev = phy_connect(db->ndev, phy_id, dm9051_handle_link_change,
PHY_INTERFACE_MODE_MII);
- if (IS_ERR(db->phydev))
- return PTR_ERR_OR_ZERO(db->phydev);
- return 0;
+ return PTR_ERR_OR_ZERO(db->phydev);
}
static int dm9051_probe(struct spi_device *spi)