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

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.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 74ce94ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {