[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160607180450.GM29844@pali>
Date: Tue, 7 Jun 2016 20:04:50 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: Mario Limonciello <mario_limonciello@...l.com>
Cc: hayeswang@...ltek.com, LKML <linux-kernel@...r.kernel.org>,
Netdev <netdev@...r.kernel.org>,
Linux USB <linux-usb@...r.kernel.org>,
anthony.wong@...onical.com, Greg KH <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v5] r8152: Add support for setting pass through MAC
address on RTL8153-AD
Hi! Another problem which I found now:
On Tuesday 07 June 2016 10:33:47 Mario Limonciello wrote:
> + ret = hex2bin(buf, obj->string.pointer + 9, 6);
> + if (!(ret == 0 && is_valid_ether_addr(buf))) {
> + netif_warn(tp, probe, tp->netdev,
> + "Invalid MAC when reading pass-thru MAC addr: "
> + "%pM\n",
> + buf);
> + goto amacout;
> + }
In case when hex2bin returns zero, but is_valid_ether_addr returns
false, this function returns also zero. And thats wrong, because error
occur.
--
Pali Rohár
pali.rohar@...il.com
Powered by blists - more mailing lists