Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddc1e975 authored by Ben Dooks's avatar Ben Dooks Committed by Linus Torvalds
Browse files

[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: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 14fd9b3f
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -148,13 +148,11 @@ extern int spi_register_driver(struct spi_driver *sdrv);


static inline void spi_unregister_driver(struct spi_driver *sdrv)
static inline void spi_unregister_driver(struct spi_driver *sdrv)
{
{
	if (!sdrv)
	if (sdrv)
		return;
		driver_unregister(&sdrv->driver);
		driver_unregister(&sdrv->driver);
}
}





/**
/**
 * struct spi_master - interface to SPI master controller
 * struct spi_master - interface to SPI master controller
 * @cdev: class interface to this driver
 * @cdev: class interface to this driver