mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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:
parent
4db7e1786d
commit
58031a26bf
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user