net: dsa: mv88e6xxx: Be explicit about DT or pdata
Make it explicit that either device tree is used or platform data. If
neither is available, abort the probe.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 877b7cb0b6
("net: dsa: mv88e6xxx: Add minimal platform_data support")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e2b3e49378
commit
7bb8c9969d
|
@ -4389,6 +4389,9 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
|
|||
int port;
|
||||
int err;
|
||||
|
||||
if (!np && !pdata)
|
||||
return -EINVAL;
|
||||
|
||||
if (np)
|
||||
compat_info = of_device_get_match_data(dev);
|
||||
|
||||
|
|
Loading…
Reference in a new issue