From ddc1e9753106cedcca7944d2b068baa2e14640b1 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 12 Feb 2007 00:52:43 -0800 Subject: [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 --- include/linux/spi/spi.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include/linux/spi/spi.h') 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 -- cgit v1.2.3