aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorEddie James2020-06-09 15:15:55 -0500
committerWolfram Sang2020-07-24 21:31:33 +0200
commit58031a26bf2b0c458511df146143c78ab569f4da (patch)
tree731af6a3e2109b3eab3b1cb88564b1722f3c2843 /drivers/i2c
parent4db7e1786db505eee86e6301cd42967f4da43be8 (diff)
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-fsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-fsi.c b/drivers/i2c/busses/i2c-fsi.c
index 977d6f524649..10332693edf0 100644
--- a/drivers/i2c/busses/i2c-fsi.c
+++ b/drivers/i2c/busses/i2c-fsi.c
@@ -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);