Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4495c15f authored by Xiaochen Wang's avatar Xiaochen Wang Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: check _malloc return value



Description: The original check is wrong.

Signed-off-by: default avatarXiaochen Wang <wangxiaochen0@gmail.com>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cd922740
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -958,7 +958,7 @@ static int r871x_wx_set_priv(struct net_device *dev,

	len = dwrq->length;
	ext = _malloc(len);
	if (!_malloc(len))
	if (!ext)
		return -ENOMEM;
	if (copy_from_user(ext, dwrq->pointer, len)) {
		kfree(ext);