diff mbox

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

Message ID 1393997661.19790.0.camel@phoenix (mailing list archive)
State Accepted
Commit 14c48ab2d9be451ff51783cfb9996428b145e878
Headers show

Commit Message

Axel Lin March 5, 2014, 5:34 a.m. UTC
We already has NULL test for master after calling spi_alloc_master().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/spi/spi-oc-tiny.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mark Brown March 13, 2014, 9:54 a.m. UTC | #1
On Wed, Mar 05, 2014 at 01:34:21PM +0800, Axel Lin wrote:
> We already has NULL test for master after calling spi_alloc_master().

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c
index 022774e..8998d11 100644
--- a/drivers/spi/spi-oc-tiny.c
+++ b/drivers/spi/spi-oc-tiny.c
@@ -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;