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>
This commit is contained in:
parent
74ce94ac38
commit
f24f966feb
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user