diff options
-rw-r--r-- | drivers/video/ps3fb.c | 16 |
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); |
1222 | err_gpu_memory_free: | 1224 | err_gpu_memory_free: |
1223 | lv1_gpu_memory_free(ps3fb.memory_handle); | 1225 | lv1_gpu_memory_free(ps3fb.memory_handle); |
1226 | err_close_device: | ||
1227 | ps3_close_hv_device(dev); | ||
1224 | err: | 1228 | err: |
1225 | return retval; | 1229 | return retval; |
1226 | } | 1230 | } |