diff options
author | 2024-08-29 15:25:38 +0800 | |
---|---|---|
committer | 2024-08-30 11:11:00 -0700 | |
commit | f24f966feb62164f4a68d1b84e866504904ac4ac (patch) | |
tree | cc538cfb3294dcf79b69d7a6c272c3e7abac59fd | |
parent | sfc: Convert to use ERR_CAST() (diff) | |
download | wireguard-linux-f24f966feb62164f4a68d1b84e866504904ac4ac.tar.xz wireguard-linux-f24f966feb62164f4a68d1b84e866504904ac4ac.zip |
nfp: Convert to use ERR_CAST()
Use ERR_CAST() as it is designed for casting an error pointer to
another type.
Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
Link: https://patch.msgid.link/20240829072538.33195-1-shenlichuan@vivo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |