diff options
author | Dan Carpenter <error27@gmail.com> | 2011-02-26 15:48:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-28 19:00:30 -0800 |
commit | 0e83f46d3869a5255a04b875bb885bd141a609ef (patch) | |
tree | ca4376cb2c5fef18ec0deed87528ab9531ebffac | |
parent | 1f2b472cc92d6178c5b24c12687783a0dedb9202 (diff) | |
download | op-kernel-dev-0e83f46d3869a5255a04b875bb885bd141a609ef.zip op-kernel-dev-0e83f46d3869a5255a04b875bb885bd141a609ef.tar.gz |
staging: gma500: fix some swapped gotos
These gotos were swapped. In the original code, the first would result
in a NULL dereference and the second would result in a memory leak.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/gma500/psb_fb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/gma500/psb_fb.c b/drivers/staging/gma500/psb_fb.c index 94d8457..f67f53b 100644 --- a/drivers/staging/gma500/psb_fb.c +++ b/drivers/staging/gma500/psb_fb.c @@ -460,7 +460,7 @@ static int psbfb_create(struct psb_fbdev *fbdev, if (!fb) { DRM_ERROR("failed to allocate fb.\n"); ret = -ENOMEM; - goto out_err0; + goto out_err1; } psbfb = to_psb_fb(fb); psbfb->size = size; @@ -468,7 +468,7 @@ static int psbfb_create(struct psb_fbdev *fbdev, info = framebuffer_alloc(sizeof(struct psb_fbdev), device); if (!info) { ret = -ENOMEM; - goto out_err1; + goto out_err0; } info->par = fbdev; |