Skip to content

Commit

Permalink
i2c: fsi: Prevent adding adapters for ports without dts nodes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eddie James authored and Wolfram Sang committed Jul 24, 2020
1 parent 4db7e17 commit 58031a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 58031a2

Please sign in to comment.