提交 eacd121c 编写于 作者: V Vasiliy Kulikov 提交者: Greg Kroah-Hartman

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: NVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 705059a6
...@@ -1675,13 +1675,14 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ...@@ -1675,13 +1675,14 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
{ {
char essid[IW_ESSID_MAX_SIZE+1]; char essid[IW_ESSID_MAX_SIZE+1];
if (wrq->u.essid.pointer) if (wrq->u.essid.pointer) {
rc = iwctl_giwessid(dev, NULL, rc = iwctl_giwessid(dev, NULL,
&(wrq->u.essid), essid); &(wrq->u.essid), essid);
if (copy_to_user(wrq->u.essid.pointer, if (copy_to_user(wrq->u.essid.pointer,
essid, essid,
wrq->u.essid.length) ) wrq->u.essid.length) )
rc = -EFAULT; rc = -EFAULT;
}
} }
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册