Skip to contentSkip to conversation

spi: altera: Remove unneeded NULL checking for hw->bitbang.master

PATCH Applied Axel Lin 2 participants 2 messages Jan 12, 2014 – Jan 13, 2014 SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 spi: altera: Remove unneeded NULL checking for hw->bitbang.master

We already has NULL test for master after calling spi_alloc_master().

---
 drivers/spi/spi-altera.c | 2 --
 1 file changed, 2 deletions(-)
drivers/spi/spi-altera.c +0 -2
index 595b62c..5d7deaf 100644
@@ -220,8 +220,6 @@ static int altera_spi_probe(struct platform_device *pdev)
 
 	/* setup the state for the bitbang driver */
 	hw->bitbang.master = master;
-	if (!hw->bitbang.master)
-		return err;
 	hw->bitbang.chipselect = altera_spi_chipsel;
 	hw->bitbang.txrx_bufs = altera_spi_txrx;
 
Signature · 8 lines
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#1 lore raw
Quoted 1 line · Axel Lin

We already has NULL test for master after calling spi_alloc_master().

Applied, thanks,