Skip to content

Commit

Permalink
nfp: Convert to use ERR_CAST()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shen Lichuan authored and Jakub Kicinski committed Aug 30, 2024
1 parent 74ce94a commit f24f966
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f24f966

Please sign in to comment.