From: Ben Dooks Date: Mon, 12 Feb 2007 08:52:43 +0000 (-0800) Subject: [PATCH] spi: remove return in spi_unregister_driver() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ddc1e9753106cedcca7944d2b068baa2e14640b1;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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: Ben Dooks Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index e25fcae89d3b..851b25d6e82b 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -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