Commit 8fa82b16 authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Walleij

gpio: gpio-mc33880: Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 187a53a5
...@@ -142,7 +142,6 @@ static int mc33880_probe(struct spi_device *spi) ...@@ -142,7 +142,6 @@ static int mc33880_probe(struct spi_device *spi)
return ret; return ret;
exit_destroy: exit_destroy:
spi_set_drvdata(spi, NULL);
mutex_destroy(&mc->lock); mutex_destroy(&mc->lock);
return ret; return ret;
} }
...@@ -156,8 +155,6 @@ static int mc33880_remove(struct spi_device *spi) ...@@ -156,8 +155,6 @@ static int mc33880_remove(struct spi_device *spi)
if (mc == NULL) if (mc == NULL)
return -ENODEV; return -ENODEV;
spi_set_drvdata(spi, NULL);
ret = gpiochip_remove(&mc->chip); ret = gpiochip_remove(&mc->chip);
if (!ret) if (!ret)
mutex_destroy(&mc->lock); mutex_destroy(&mc->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment