Skip to content
Snippets Groups Projects
Commit a3454d19 authored by Pavel Kubelun's avatar Pavel Kubelun Committed by John Crispin
Browse files

net: ar8216: prevent device duplication in ar8xxx_dev_list

Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/fd7b89dd464a4afffa04ff2e17c771dfe95668cf%5E%21/#F0


Signed-off-by: default avatarPavel Kubelun <be.dissent@gmail.com>

CHROMIUM: drivers: ar8216: prevent device duplication in ar8xxx_dev_list

If probe is called twice, once for PHY0 and a second time for PHY4,
the same switch device will be added twice to ar8xxx_dev_list, while
supposedly this list should have one element per hardware switch present
in the system.

While no negative impact have been observed, it does happen if a
platform instanciates these two PHYs from device-tree, as an example.

Change-Id: Iddcbdf7d4adacb0af01975b73f8e56b4582e894e
Signed-off-by: default avatarMathieu Olivari <mathieu@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/234790


Reviewed-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Reviewed-by: default avatarToshi Kikuchi <toshik@chromium.org>
Tested-by: default avatarToshi Kikuchi <toshik@chromium.org>
parent eb049d37
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment