提交 49f1d6bc 编写于 作者: S Sachin Kamat 提交者: Linus Walleij

gpio: gpio-74x164: Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Cc: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 7af2755d
......@@ -176,7 +176,6 @@ static int gen_74x164_probe(struct spi_device *spi)
return ret;
exit_destroy:
spi_set_drvdata(spi, NULL);
mutex_destroy(&chip->lock);
return ret;
}
......@@ -190,8 +189,6 @@ static int gen_74x164_remove(struct spi_device *spi)
if (chip == NULL)
return -ENODEV;
spi_set_drvdata(spi, NULL);
ret = gpiochip_remove(&chip->gpio_chip);
if (!ret)
mutex_destroy(&chip->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册