spi: jcore: remove unnecessary platform_set_drvdata()
authorWei Yongjun <weiyj.lk@gmail.com>
Mon, 8 Aug 2016 13:53:23 +0000 (13:53 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 9 Aug 2016 09:40:05 +0000 (10:40 +0100)
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-jcore.c

index 7d2044a106a285fece1a255e37b7ea04d54d8b3e..f8117b80fa22e7ac8d5108f403166e178858cdb5 100644 (file)
@@ -206,7 +206,6 @@ static int jcore_spi_probe(struct platform_device *pdev)
 exit_busy:
        err = -EBUSY;
 exit:
-       platform_set_drvdata(pdev, NULL);
        spi_master_put(master);
        return err;
 }