Commit 58031a26 authored by Eddie James's avatar Eddie James Committed by Wolfram Sang
Browse files

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: default avatarEddie James <eajames@linux.ibm.com>
Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 4db7e178
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);