diff mbox

[v1,04/10] spi: dw: remove a NULL check when call ->remove()

Message ID 1444853545-59868-5-git-send-email-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Shevchenko Oct. 14, 2015, 8:12 p.m. UTC
Currently all users aware about calling dw_spi_remove_host() with properly set
parameter. Remove unneeded check.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-dw.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mark Brown Oct. 19, 2015, 7:32 p.m. UTC | #1
On Wed, Oct 14, 2015 at 11:12:19PM +0300, Andy Shevchenko wrote:
> Currently all users aware about calling dw_spi_remove_host() with properly set
> parameter. Remove unneeded check.

This looks good but depends on patch 1.
diff mbox

Patch

diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index ad370b9..5f6c7d9 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -563,8 +563,6 @@  void dw_spi_remove_host(struct dw_spi *dws)
 {
 	struct spi_master *master = dws->master;
 
-	if (!dws)
-		return;
 	dw_spi_debugfs_remove(dws);
 
 	devm_free_irq(master->dev.parent, dws->irq, master);