From: Ben Dooks Date: Mon, 12 Feb 2007 08:52:43 +0000 (-0800) Subject: [PATCH] spi: remove return in spi_unregister_driver() X-Git-Tag: v2.6.21-rc1~274^2~163 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddc1e9753106cedcca7944d2b068baa2e14640b1;p=linux-2.6 [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 e25fcae89d..851b25d6e8 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