From: Sudip Mukherjee Date: Thu, 17 Sep 2015 16:44:34 +0000 (+0530) Subject: staging: slicoss: use status in slic_ioctl X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4b8645d64375a82971cebb312a6f665dc586686f;p=linux-beck.git staging: slicoss: use status in slic_ioctl 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index fb663c885544..6ff0b838db79 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;