netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Mario Limonciello <mario_limonciello@dell.com>
Cc: hayeswang@realtek.com, LKML <linux-kernel@vger.kernel.org>,
	Netdev <netdev@vger.kernel.org>,
	Linux USB <linux-usb@vger.kernel.org>,
	anthony.wong@canonical.com, Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v5] r8152: Add support for setting pass through MAC address on RTL8153-AD
Date: Tue, 7 Jun 2016 20:04:50 +0200	[thread overview]
Message-ID: <20160607180450.GM29844@pali> (raw)
In-Reply-To: <1465313627-13479-1-git-send-email-mario_limonciello@dell.com>

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@gmail.com

      reply	other threads:[~2016-06-07 18:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 15:33 [PATCH v5] r8152: Add support for setting pass through MAC address on RTL8153-AD Mario Limonciello
2016-06-07 18:04 ` Pali Rohár [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160607180450.GM29844@pali \
    --to=pali.rohar@gmail.com \
    --cc=anthony.wong@canonical.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hayeswang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mario_limonciello@dell.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).