Commit f24f966f authored by Shen Lichuan's avatar Shen Lichuan Committed by Jakub Kicinski

nfp: Convert to use ERR_CAST()

Use ERR_CAST() as it is designed for casting an error pointer to
another type.
Signed-off-by: default avatarShen Lichuan <shenlichuan@vivo.com>
Link: https://patch.msgid.link/20240829072538.33195-1-shenlichuan@vivo.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 74ce94ac
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment