소스 검색

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

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

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Axel Lin 11 년 전
부모
커밋
14c48ab2d9
1개의 변경된 파일0개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 2
      drivers/spi/spi-oc-tiny.c

+ 0 - 2
drivers/spi/spi-oc-tiny.c

@@ -267,8 +267,6 @@ static int tiny_spi_probe(struct platform_device *pdev)
 
 
 	/* setup the state for the bitbang driver */
 	/* setup the state for the bitbang driver */
 	hw->bitbang.master = master;
 	hw->bitbang.master = master;
-	if (!hw->bitbang.master)
-		return err;
 	hw->bitbang.setup_transfer = tiny_spi_setup_transfer;
 	hw->bitbang.setup_transfer = tiny_spi_setup_transfer;
 	hw->bitbang.chipselect = tiny_spi_chipselect;
 	hw->bitbang.chipselect = tiny_spi_chipselect;
 	hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs;
 	hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs;