diff options
-rw-r--r-- | drivers/video/pnx4008/pnxrgbfb.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/video/pnx4008/pnxrgbfb.c b/drivers/video/pnx4008/pnxrgbfb.c index 685761a0732c..4db6b48a8715 100644 --- a/drivers/video/pnx4008/pnxrgbfb.c +++ b/drivers/video/pnx4008/pnxrgbfb.c | |||
@@ -100,7 +100,6 @@ static int rgbfb_remove(struct platform_device *pdev) | |||
100 | fb_dealloc_cmap(&info->cmap); | 100 | fb_dealloc_cmap(&info->cmap); |
101 | framebuffer_release(info); | 101 | framebuffer_release(info); |
102 | platform_set_drvdata(pdev, NULL); | 102 | platform_set_drvdata(pdev, NULL); |
103 | kfree(info); | ||
104 | } | 103 | } |
105 | 104 | ||
106 | pnx4008_free_dum_channel(channel_owned, pdev->id); | 105 | pnx4008_free_dum_channel(channel_owned, pdev->id); |
@@ -168,23 +167,21 @@ static int __devinit rgbfb_probe(struct platform_device *pdev) | |||
168 | 167 | ||
169 | ret = fb_alloc_cmap(&info->cmap, 256, 0); | 168 | ret = fb_alloc_cmap(&info->cmap, 256, 0); |
170 | if (ret < 0) | 169 | if (ret < 0) |
171 | goto err2; | 170 | goto err1; |
172 | 171 | ||
173 | ret = register_framebuffer(info); | 172 | ret = register_framebuffer(info); |
174 | if (ret < 0) | 173 | if (ret < 0) |
175 | goto err3; | 174 | goto err2; |
176 | platform_set_drvdata(pdev, info); | 175 | platform_set_drvdata(pdev, info); |
177 | 176 | ||
178 | return 0; | 177 | return 0; |
179 | 178 | ||
180 | err3: | ||
181 | fb_dealloc_cmap(&info->cmap); | ||
182 | err2: | 179 | err2: |
183 | framebuffer_release(info); | 180 | fb_dealloc_cmap(&info->cmap); |
184 | err1: | 181 | err1: |
185 | pnx4008_free_dum_channel(channel_owned, pdev->id); | 182 | pnx4008_free_dum_channel(channel_owned, pdev->id); |
186 | err0: | 183 | err0: |
187 | kfree(info); | 184 | framebuffer_release(info); |
188 | err: | 185 | err: |
189 | return ret; | 186 | return ret; |
190 | } | 187 | } |