i2c: fsi: Prevent adding adapters for ports without dts nodes

Ports should be defined in the devicetree if they are to be enabled on
the system.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
Eddie James 2020-06-09 15:15:55 -05:00 committed by Wolfram Sang
parent 4db7e1786d
commit 58031a26bf

View file

@ -703,7 +703,7 @@ static int fsi_i2c_probe(struct device *dev)
for (port_no = 0; port_no < ports; port_no++) {
np = fsi_i2c_find_port_of_node(dev->of_node, port_no);
if (np && !of_device_is_available(np))
if (!of_device_is_available(np))
continue;
port = kzalloc(sizeof(*port), GFP_KERNEL);