Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1227210

[PATCH 3/4] staging: slicoss: use status in slic_ioctl

From Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/4] staging: slicoss: use status in slic_ioctl
Date 2015-09-17 18:50 +0200
Message-ID <q9KxI-W9-31@gated-at.bofh.it> (permalink)
References <q9KxI-W9-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In the ioctl function if we are not able to UP the link after setting
the new parameters then return an error code to the userspace.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/slicoss/slicoss.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index fb663c8..6ff0b83 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -2624,7 +2624,8 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 				else
 					duplex = 0;
 				slic_link_config(adapter, speed, duplex);
-				slic_link_event_handler(adapter);
+				if (slic_link_event_handler(adapter))
+					return -EFAULT;
 			}
 		}
 		return 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] staging: slicoss: return status of slic_link_event_handler Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-17 18:50 +0200
  [PATCH 2/4] staging: slicoss: use status in slic_if_init Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-17 18:50 +0200
  [PATCH 3/4] staging: slicoss: use status in slic_ioctl Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-17 18:50 +0200
  [PATCH 4/4] staging: slicoss: use status in isr Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-17 18:50 +0200

csiph-web