We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82c850c commit cd8f318Copy full SHA for cd8f318
drivers/gpu/drm/gma500/framebuffer.c
@@ -352,6 +352,7 @@ static struct drm_framebuffer *psb_user_framebuffer_create
352
const struct drm_mode_fb_cmd2 *cmd)
353
{
354
struct drm_gem_object *obj;
355
+ struct drm_framebuffer *fb;
356
357
/*
358
* Find the GEM object and thus the gtt range object that is
@@ -362,7 +363,11 @@ static struct drm_framebuffer *psb_user_framebuffer_create
362
363
return ERR_PTR(-ENOENT);
364
365
/* Let the core code do all the work */
- return psb_framebuffer_create(dev, cmd, obj);
366
+ fb = psb_framebuffer_create(dev, cmd, obj);
367
+ if (IS_ERR(fb))
368
+ drm_gem_object_put(obj);
369
+
370
+ return fb;
371
}
372
373
static int psbfb_probe(struct drm_fb_helper *fb_helper,
0 commit comments