The fb id string was used in an error message right before it was set. Reversing the order of the code fixes this.
Signed-off-by: Egbert Eich eich@suse.de --- drivers/gpu/drm/mgag200/mgag200_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 6453e4c..371f3eb 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -211,6 +211,8 @@ static int mgag200fb_create(struct drm_fb_helper *helper, mfbdev->helper.fb = fb; mfbdev->helper.fbdev = info;
+ strcpy(info->fix.id, "mgadrmfb"); + ret = fb_alloc_cmap(&info->cmap, 256, 0); if (ret) { DRM_ERROR("%s: can't allocate color map\n", info->fix.id); @@ -218,8 +220,6 @@ static int mgag200fb_create(struct drm_fb_helper *helper, goto out; }
- strcpy(info->fix.id, "mgadrmfb"); - info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT; info->fbops = &mgag200fb_ops;