Message ID | 20240829072538.33195-1-shenlichuan@vivo.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f24f966feb62164f4a68d1b84e866504904ac4ac |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v1,net-next] nfp: Convert to use ERR_CAST() | expand |
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Thu, 29 Aug 2024 15:25:38 +0800 you wrote: > Use ERR_CAST() as it is designed for casting an error pointer to > another type. > > Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> > --- > drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - [v1,net-next] nfp: Convert to use ERR_CAST() https://git.kernel.org/netdev/net-next/c/f24f966feb62 You are awesome, thank you!
diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c index 7136bc48530b..df0234a338a8 100644 --- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c +++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c @@ -278,7 +278,7 @@ struct nfp_nsp *nfp_nsp_open(struct nfp_cpp *cpp) res = nfp_resource_acquire(cpp, NFP_RESOURCE_NSP); if (IS_ERR(res)) - return (void *)res; + return ERR_CAST(res); state = kzalloc(sizeof(*state), GFP_KERNEL); if (!state) {
Use ERR_CAST() as it is designed for casting an error pointer to another type. Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> --- drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)