mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
drm/i915/fbdev: make intel_framebuffer_create() error return handling explicit
It's sketchy to pass error pointers via to_intel_framebuffer(). It probably works as long as struct intel_framebuffer embeds struct drm_framebuffer at offset 0, but be explicit about it. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://lore.kernel.org/r/17631db227d527d6c67f5d6b67adec1ff8dc6f8d.1758184771.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
4a36b339a1
commit
6979d2c80c
|
|
@ -67,9 +67,16 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
|
|||
mode_cmd.pixel_format,
|
||||
mode_cmd.modifier[0]),
|
||||
&mode_cmd);
|
||||
if (IS_ERR(fb)) {
|
||||
i915_gem_object_put(obj);
|
||||
goto err;
|
||||
}
|
||||
|
||||
i915_gem_object_put(obj);
|
||||
|
||||
return to_intel_framebuffer(fb);
|
||||
err:
|
||||
return ERR_CAST(fb);
|
||||
}
|
||||
|
||||
int intel_fbdev_fb_fill_info(struct intel_display *display, struct fb_info *info,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user