提交 ddc1e975 编写于 作者: B Ben Dooks 提交者: Linus Torvalds

[PATCH] spi: remove return in spi_unregister_driver()

Make the spi_unregister_driver() code fit in with the rest of the header
file, and only do the action if the driver passed is non-NULL.

This also makes the code a line smaller.
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 14fd9b3f
......@@ -148,13 +148,11 @@ extern int spi_register_driver(struct spi_driver *sdrv);
static inline void spi_unregister_driver(struct spi_driver *sdrv)
{
if (!sdrv)
return;
driver_unregister(&sdrv->driver);
if (sdrv)
driver_unregister(&sdrv->driver);
}
/**
* struct spi_master - interface to SPI master controller
* @cdev: class interface to this driver
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册