Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 503c0188 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller
Browse files

l2tp: fix set but not used variable



GCC complains:

net/l2tp/l2tp_ppp.c: In function ‘pppol2tp_ioctl’:
net/l2tp/l2tp_ppp.c:1073:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable]
  int val;
      ^~~

Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0bc19985
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1070,7 +1070,6 @@ static int pppol2tp_ioctl(struct socket *sock, unsigned int cmd,
{
	struct pppol2tp_ioc_stats stats;
	struct l2tp_session *session;
	int val;

	switch (cmd) {
	case PPPIOCGMRU:
@@ -1097,7 +1096,7 @@ static int pppol2tp_ioctl(struct socket *sock, unsigned int cmd,
		if (!session->session_id && !session->peer_session_id)
			return -ENOSYS;

		if (get_user(val, (int __user *)arg))
		if (!access_ok((int __user *)arg, sizeof(int)))
			return -EFAULT;
		break;