Staging: fbtft: fbtft-core: Removed unnecessary checks
authorNizam Haider <nizamhaider786@gmail.com>
Sun, 22 Nov 2015 04:09:26 +0000 (09:39 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 03:37:36 +0000 (19:37 -0800)
The driver core clears the driver data to NULL after device_release
or on probe failure.

Signed-off-by: Nizam Haider <nijamh@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c

index b1e45161eefcf45cf04e65c1bdab3d2aa52dcf0c..6824d5ff2d8c1d1b8b368fa64fbc10a82a94548f 100644 (file)
@@ -989,8 +989,6 @@ reg_fail:
                par->fbtftops.unregister_backlight(par);
        if (spi)
                spi_set_drvdata(spi, NULL);
-       if (par->pdev)
-               platform_set_drvdata(par->pdev, NULL);
 
        return ret;
 }
@@ -1012,8 +1010,6 @@ int fbtft_unregister_framebuffer(struct fb_info *fb_info)
 
        if (spi)
                spi_set_drvdata(spi, NULL);
-       if (par->pdev)
-               platform_set_drvdata(par->pdev, NULL);
        if (par->fbtftops.unregister_backlight)
                par->fbtftops.unregister_backlight(par);
        fbtft_sysfs_exit(par);