aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index e691e281e3a2..e6f076d5ffd5 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -345,14 +345,12 @@ static DEFINE_MUTEX(board_lock);
345struct spi_device *spi_alloc_device(struct spi_master *master) 345struct spi_device *spi_alloc_device(struct spi_master *master)
346{ 346{
347 struct spi_device *spi; 347 struct spi_device *spi;
348 struct device *dev = master->dev.parent;
349 348
350 if (!spi_master_get(master)) 349 if (!spi_master_get(master))
351 return NULL; 350 return NULL;
352 351
353 spi = kzalloc(sizeof(*spi), GFP_KERNEL); 352 spi = kzalloc(sizeof(*spi), GFP_KERNEL);
354 if (!spi) { 353 if (!spi) {
355 dev_err(dev, "cannot alloc spi_device\n");
356 spi_master_put(master); 354 spi_master_put(master);
357 return NULL; 355 return NULL;
358 } 356 }