* [PATCH net-next v2] net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code
@ 2023-08-17 2:24 Ruan Jinjie
2023-08-19 0:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Ruan Jinjie @ 2023-08-17 2:24 UTC (permalink / raw)
To: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Cc: ruanjinjie
Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
simplify code.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei•com>
Reviewed-by: Leon Romanovsky <leonro@nvidia•com>
---
v2:
- Update the subject prefix.
---
drivers/net/ethernet/davicom/dm9051.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/davicom/dm9051.c b/drivers/net/ethernet/davicom/dm9051.c
index 70728b2e5f18..2caaf1e9f42f 100644
--- a/drivers/net/ethernet/davicom/dm9051.c
+++ b/drivers/net/ethernet/davicom/dm9051.c
@@ -510,10 +510,7 @@ static int dm9051_map_init(struct spi_device *spi, struct board_info *db)
regconfigdmbulk.lock_arg = db;
db->regmap_dmbulk = devm_regmap_init_spi(db->spidev, ®configdmbulk);
- if (IS_ERR(db->regmap_dmbulk))
- return PTR_ERR(db->regmap_dmbulk);
-
- return 0;
+ return PTR_ERR_OR_ZERO(db->regmap_dmbulk);
}
static int dm9051_map_chipid(struct board_info *db)
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v2] net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code
2023-08-17 2:24 [PATCH net-next v2] net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code Ruan Jinjie
@ 2023-08-19 0:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-19 0:10 UTC (permalink / raw)
To: Ruan Jinjie; +Cc: netdev, davem, edumazet, kuba, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel•org>:
On Thu, 17 Aug 2023 10:24:18 +0800 you wrote:
> Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
> simplify code.
>
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei•com>
> Reviewed-by: Leon Romanovsky <leonro@nvidia•com>
> ---
> v2:
> - Update the subject prefix.
>
> [...]
Here is the summary with links:
- [net-next,v2] net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code
https://git.kernel.org/netdev/net-next/c/829b3357dd97
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-19 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 2:24 [PATCH net-next v2] net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code Ruan Jinjie
2023-08-19 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox