gpio: xgene: simplify probe, return devm_gpiochip_add_data() directly
authorAlexandru Ardelean <aardelean@deviqon.com>
Fri, 21 May 2021 18:10:42 +0000 (21:10 +0300)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Sun, 23 May 2021 18:30:26 +0000 (20:30 +0200)
commit94a7b66910ea6e4583addd8212aa8cd3f7a8c9c1
tree751798262bad06ad42d312d5fb5424296e3e4bfd
parent91d594b2db51f680ba52862d1bbe14801b4dcd54
gpio: xgene: simplify probe, return devm_gpiochip_add_data() directly

The handling of the return value from devm_gpiochip_add_data() is a bit
redundant. It prints messages on error and success cases.
While the success message may be useful, it is more in the area of log
spam, and these can be printed with other forms of kernel logging.

This change does a direct return with devm_gpiochip_add_data() in the probe
function.

The platform_set_drvdata() is needed, as this driver uses the stored
private date in the PM suspend/resume routines.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-xgene.c