aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-max732x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-max732x.c')
-rw-r--r--drivers/gpio/gpio-max732x.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index 9d8bcc69f245..f03cb0ba7726 100644
--- a/drivers/gpio/gpio-max732x.c
+++ b/drivers/gpio/gpio-max732x.c
@@ -653,6 +653,12 @@ static int max732x_probe(struct i2c_client *client,
653 chip->client_group_a = client; 653 chip->client_group_a = client;
654 if (nr_port > 8) { 654 if (nr_port > 8) {
655 c = i2c_new_dummy(client->adapter, addr_b); 655 c = i2c_new_dummy(client->adapter, addr_b);
656 if (!c) {
657 dev_err(&client->dev,
658 "Failed to allocate I2C device\n");
659 ret = -ENODEV;
660 goto out_failed;
661 }
656 chip->client_group_b = chip->client_dummy = c; 662 chip->client_group_b = chip->client_dummy = c;
657 } 663 }
658 break; 664 break;
@@ -660,6 +666,12 @@ static int max732x_probe(struct i2c_client *client,
660 chip->client_group_b = client; 666 chip->client_group_b = client;
661 if (nr_port > 8) { 667 if (nr_port > 8) {
662 c = i2c_new_dummy(client->adapter, addr_a); 668 c = i2c_new_dummy(client->adapter, addr_a);
669 if (!c) {
670 dev_err(&client->dev,
671 "Failed to allocate I2C device\n");
672 ret = -ENODEV;
673 goto out_failed;
674 }
663 chip->client_group_a = chip->client_dummy = c; 675 chip->client_group_a = chip->client_dummy = c;
664 } 676 }
665 break; 677 break;