net: dsa: slave: chip data is optional, don't dereference NULL
authorAndrew Lunn <andrew@lunn.ch>
Sat, 4 Jun 2016 19:16:52 +0000 (21:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Jun 2016 21:29:52 +0000 (14:29 -0700)
commit0e5760440842eee57ff573251e95289e2ee7b15f
treeb8599569a9211732b0d9abe3648829946d0618b2
parent76f21b99004ef1f16be6184678f660eab911b8b8
net: dsa: slave: chip data is optional, don't dereference NULL

The new binding does not make use of dsa_chip_data, a.k.a cd.  When
retrieving the size of the EEPROM attached to a switch, don't assume
there is a cd attached to the switch structure.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c