summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/spi/spi.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index e25fcae89d3..851b25d6e82 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