staging: vt6656: implement missing brackets
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>
This commit is contained in:
parent
705059a670
commit
eacd121c3d
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue