Skip to contentSkip to conversation

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

PATCH Applied Axel Lin 2 participants 2 messages Mar 5, 2014 – Mar 13, 2014 SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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

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

---
 drivers/spi/spi-oc-tiny.c | 2 --
 1 file changed, 2 deletions(-)
drivers/spi/spi-oc-tiny.c +0 -2
index 022774e..8998d11 100644
@@ -266,8 +266,6 @@ static int tiny_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.setup_transfer = tiny_spi_setup_transfer;
 	hw->bitbang.chipselect = tiny_spi_chipselect;
 	hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs;
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.