aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2009-06-10 00:38:44 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-14 23:26:19 -0400
commitca971ea39fa92add0fa596ad80affd7db781d762 (patch)
treef95547c1eacb5cb267e70a8e267996cf53c74107 /drivers/video
parentbb94f077e5c1d3276fe656665c2574fdd3483e75 (diff)
ps3fb: Correct handling of device opening in ps3fb_probe()
- ps3_open_hv_device() returns a standard error value, - Add missing call to ps3_close_hv_device() in the error path. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: linux-fbdev-devel@lists.sourceforge.net Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/ps3fb.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
index a74501815333..542ffc306c72 100644
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -985,7 +985,7 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev)
985{ 985{
986 struct fb_info *info; 986 struct fb_info *info;
987 struct ps3fb_par *par; 987 struct ps3fb_par *par;
988 int retval = -ENOMEM; 988 int retval;
989 u64 ddr_lpar = 0; 989 u64 ddr_lpar = 0;
990 u64 lpar_dma_control = 0; 990 u64 lpar_dma_control = 0;
991 u64 lpar_driver_info = 0; 991 u64 lpar_driver_info = 0;
@@ -1003,8 +1003,8 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev)
1003 return -ENOMEM; 1003 return -ENOMEM;
1004 } 1004 }
1005 1005
1006 status = ps3_open_hv_device(dev); 1006 retval = ps3_open_hv_device(dev);
1007 if (status) { 1007 if (retval) {
1008 dev_err(&dev->core, "%s: ps3_open_hv_device failed\n", 1008 dev_err(&dev->core, "%s: ps3_open_hv_device failed\n",
1009 __func__); 1009 __func__);
1010 goto err; 1010 goto err;
@@ -1027,7 +1027,8 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev)
1027 "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: " 1027 "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: "
1028 "%d\n", 1028 "%d\n",
1029 __func__, status); 1029 __func__, status);
1030 goto err; 1030 retval = -ENODEV;
1031 goto err_close_device;
1031 } 1032 }
1032#endif 1033#endif
1033#ifdef HEAD_B 1034#ifdef HEAD_B
@@ -1040,7 +1041,8 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev)
1040 "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: " 1041 "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: "
1041 "%d\n", 1042 "%d\n",
1042 __func__, status); 1043 __func__, status);
1043 goto err; 1044 retval = -ENODEV;
1045 goto err_close_device;
1044 } 1046 }
1045#endif 1047#endif
1046 1048
@@ -1057,7 +1059,7 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev)
1057 if (status) { 1059 if (status) {
1058 dev_err(&dev->core, "%s: lv1_gpu_memory_allocate failed: %d\n", 1060 dev_err(&dev->core, "%s: lv1_gpu_memory_allocate failed: %d\n",
1059 __func__, status); 1061 __func__, status);
1060 goto err; 1062 goto err_close_device;
1061 } 1063 }
1062 dev_dbg(&dev->core, "ddr:lpar:0x%llx\n", ddr_lpar); 1064 dev_dbg(&dev->core, "ddr:lpar:0x%llx\n", ddr_lpar);
1063 1065
@@ -1221,6 +1223,8 @@ err_gpu_context_free:
1221 lv1_gpu_context_free(ps3fb.context_handle); 1223 lv1_gpu_context_free(ps3fb.context_handle);
1222err_gpu_memory_free: 1224err_gpu_memory_free:
1223 lv1_gpu_memory_free(ps3fb.memory_handle); 1225 lv1_gpu_memory_free(ps3fb.memory_handle);
1226err_close_device:
1227 ps3_close_hv_device(dev);
1224err: 1228err:
1225 return retval; 1229 return retval;
1226} 1230}