diff mbox

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

Message ID 1389508694.13361.1.camel@phoenix (mailing list archive)
State Accepted
Commit 646d79b2d7bdf99b4776f0d2d818559de710ea28
Headers show

Commit Message

Axel Lin Jan. 12, 2014, 6:38 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-altera.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mark Brown Jan. 13, 2014, 10:13 a.m. UTC | #1
On Sun, Jan 12, 2014 at 02:38:14PM +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-altera.c b/drivers/spi/spi-altera.c
index 595b62c..5d7deaf 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -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;