Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: xra1403: remove unneeded spi_set_drvdata()

There is no matching spi_get_drvdata() call in the driver, so there is no
need to do spi_set_drvdata(). This looks like it probably was copied from a
driver that used both spi_set_drvdata() & spi_get_drvdata().

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

authored by

Alexandru Ardelean and committed by
Bartosz Golaszewski
0aa42370 7d3615ae

+1 -9
+1 -9
drivers/gpio/gpio-xra1403.c
··· 186 186 return ret; 187 187 } 188 188 189 - ret = devm_gpiochip_add_data(&spi->dev, &xra->chip, xra); 190 - if (ret < 0) { 191 - dev_err(&spi->dev, "Unable to register gpiochip\n"); 192 - return ret; 193 - } 194 - 195 - spi_set_drvdata(spi, xra); 196 - 197 - return 0; 189 + return devm_gpiochip_add_data(&spi->dev, &xra->chip, xra); 198 190 } 199 191 200 192 static const struct spi_device_id xra1403_ids[] = {