Commit 2fe9f8ca authored by Nizam Haider's avatar Nizam Haider Committed by Greg Kroah-Hartman

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: default avatarNizam Haider <nijamh@cdac.in>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent de593dca
...@@ -989,8 +989,6 @@ int fbtft_register_framebuffer(struct fb_info *fb_info) ...@@ -989,8 +989,6 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
par->fbtftops.unregister_backlight(par); par->fbtftops.unregister_backlight(par);
if (spi) if (spi)
spi_set_drvdata(spi, NULL); spi_set_drvdata(spi, NULL);
if (par->pdev)
platform_set_drvdata(par->pdev, NULL);
return ret; return ret;
} }
...@@ -1012,8 +1010,6 @@ int fbtft_unregister_framebuffer(struct fb_info *fb_info) ...@@ -1012,8 +1010,6 @@ int fbtft_unregister_framebuffer(struct fb_info *fb_info)
if (spi) if (spi)
spi_set_drvdata(spi, NULL); spi_set_drvdata(spi, NULL);
if (par->pdev)
platform_set_drvdata(par->pdev, NULL);
if (par->fbtftops.unregister_backlight) if (par->fbtftops.unregister_backlight)
par->fbtftops.unregister_backlight(par); par->fbtftops.unregister_backlight(par);
fbtft_sysfs_exit(par); fbtft_sysfs_exit(par);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment