提交 dcf5272c 编写于 作者: S Sachin Kamat 提交者: Jonathan Cameron

iio: accel: kxsd9: Remove redundant variable

Return directly thereby eliminating an intermediate variable.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 670c1103
......@@ -222,7 +222,6 @@ static int kxsd9_probe(struct spi_device *spi)
{
struct iio_dev *indio_dev;
struct kxsd9_state *st;
int ret;
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
if (!indio_dev)
......@@ -244,11 +243,7 @@ static int kxsd9_probe(struct spi_device *spi)
spi_setup(spi);
kxsd9_power_up(st);
ret = iio_device_register(indio_dev);
if (ret)
return ret;
return 0;
return iio_device_register(indio_dev);
}
static int kxsd9_remove(struct spi_device *spi)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册