Commit 75e6def3 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

sctp: fix an error code in sctp_sf_eat_auth()



The sctp_sf_eat_auth() function is supposed to enum sctp_disposition
values and returning a kernel error code will cause issues in the
caller.  Change -ENOMEM to SCTP_DISPOSITION_NOMEM.

Fixes: 65b07e5d ("[SCTP]: API updates to suport SCTP-AUTH extensions.")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Acked-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a0067dfc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4482,7 +4482,7 @@ enum sctp_disposition sctp_sf_eat_auth(struct net *net,
				    SCTP_AUTH_NEW_KEY, GFP_ATOMIC);

		if (!ev)
			return -ENOMEM;
			return SCTP_DISPOSITION_NOMEM;

		sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP,
				SCTP_ULPEVENT(ev));