Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1c73a99 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij
Browse files

gpio: max732x: Remove duplicate NULL check



Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 4fbd8d19
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -709,7 +709,6 @@ static int max732x_probe(struct i2c_client *client,
	return 0;

out_failed:
	if (chip->client_dummy)
	i2c_unregister_device(chip->client_dummy);
	return ret;
}
@@ -734,7 +733,6 @@ static int max732x_remove(struct i2c_client *client)
	gpiochip_remove(&chip->gpio_chip);

	/* unregister any dummy i2c_client */
	if (chip->client_dummy)
	i2c_unregister_device(chip->client_dummy);

	return 0;