Message ID | 20161020003221.2941-2-stefan@agner.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Oct 19, 2016 at 05:32:19PM -0700, Stefan Agner wrote: > If fbdev emulation is not in use (or not built-in), fb_helper.fbdev > is NULL. Don't call calling drm_fbdev_cma_defio_fini in this case. > > Signed-off-by: Stefan Agner <stefan@agner.ch> Yeah makes sense. Applied to drm-misc. -Daniel > --- > drivers/gpu/drm/drm_fb_cma_helper.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c > index 1fd6eac..12d654d 100644 > --- a/drivers/gpu/drm/drm_fb_cma_helper.c > +++ b/drivers/gpu/drm/drm_fb_cma_helper.c > @@ -557,7 +557,8 @@ EXPORT_SYMBOL_GPL(drm_fbdev_cma_init); > void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma) > { > drm_fb_helper_unregister_fbi(&fbdev_cma->fb_helper); > - drm_fbdev_cma_defio_fini(fbdev_cma->fb_helper.fbdev); > + if (fbdev_cma->fb_helper.fbdev) > + drm_fbdev_cma_defio_fini(fbdev_cma->fb_helper.fbdev); > drm_fb_helper_release_fbi(&fbdev_cma->fb_helper); > > if (fbdev_cma->fb) { > -- > 2.10.0 >
diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c index 1fd6eac..12d654d 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -557,7 +557,8 @@ EXPORT_SYMBOL_GPL(drm_fbdev_cma_init); void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma) { drm_fb_helper_unregister_fbi(&fbdev_cma->fb_helper); - drm_fbdev_cma_defio_fini(fbdev_cma->fb_helper.fbdev); + if (fbdev_cma->fb_helper.fbdev) + drm_fbdev_cma_defio_fini(fbdev_cma->fb_helper.fbdev); drm_fb_helper_release_fbi(&fbdev_cma->fb_helper); if (fbdev_cma->fb) {
If fbdev emulation is not in use (or not built-in), fb_helper.fbdev is NULL. Don't call calling drm_fbdev_cma_defio_fini in this case. Signed-off-by: Stefan Agner <stefan@agner.ch> --- drivers/gpu/drm/drm_fb_cma_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)