diff options
-rw-r--r-- | net/core/sock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 38820eaecd43..76ff58d43e26 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -417,9 +417,8 @@ static int sock_bindtodevice(struct sock *sk, char __user *optval, int optlen) | |||
417 | if (copy_from_user(devname, optval, optlen)) | 417 | if (copy_from_user(devname, optval, optlen)) |
418 | goto out; | 418 | goto out; |
419 | 419 | ||
420 | if (devname[0] == '\0') { | 420 | index = 0; |
421 | index = 0; | 421 | if (devname[0] != '\0') { |
422 | } else { | ||
423 | struct net_device *dev; | 422 | struct net_device *dev; |
424 | 423 | ||
425 | rcu_read_lock(); | 424 | rcu_read_lock(); |