From: Nizam Haider Date: Sun, 22 Nov 2015 04:09:26 +0000 (+0530) Subject: Staging: fbtft: fbtft-core: Removed unnecessary checks X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2fe9f8caadff1e5d3069e93192a544613d4ecbf3;p=openwrt%2Fstaging%2Fblogic.git Staging: fbtft: fbtft-core: Removed unnecessary checks The driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Nizam Haider Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index b1e45161eefc..6824d5ff2d8c 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -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);