Skip to content

Commit

Permalink
staging: vt6656: implement missing brackets
Browse files Browse the repository at this point in the history
Identation says that copy_to_user() should be called only iff
wrq->u.essid.pointer is not zero.  Also it is useless to call copy_to_user(0, ...).

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Nov 9, 2010
1 parent 705059a commit eacd121
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/vt6656/main_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1675,13 +1675,14 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {

{
char essid[IW_ESSID_MAX_SIZE+1];
if (wrq->u.essid.pointer)
if (wrq->u.essid.pointer) {
rc = iwctl_giwessid(dev, NULL,
&(wrq->u.essid), essid);
if (copy_to_user(wrq->u.essid.pointer,
essid,
wrq->u.essid.length) )
rc = -EFAULT;
}
}
break;

Expand Down

0 comments on commit eacd121

Please sign in to comment.