Changes in uspace/drv/fb/amdm37x_dispc/main.c [4f87a85a:4122410] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/fb/amdm37x_dispc/main.c
r4f87a85a r4122410 60 60 ddf_fun_t *fun = ddf_fun_create(dev, fun_exposed, "viz"); 61 61 if (!fun) { 62 ddf_log_error("Failed to create visualizer function .");62 ddf_log_error("Failed to create visualizer function\n"); 63 63 return ENOMEM; 64 64 } … … 66 66 visualizer_t *vis = ddf_fun_data_alloc(fun, sizeof(visualizer_t)); 67 67 if (!vis) { 68 ddf_log_error("Failed to allocate visualizer structure .");68 ddf_log_error("Failed to allocate visualizer structure\n"); 69 69 ddf_fun_destroy(fun); 70 70 return ENOMEM; … … 79 79 ddf_dev_data_alloc(dev, sizeof(amdm37x_dispc_t)); 80 80 if (!dispc) { 81 ddf_log_error("Failed to allocate dispc structure .");81 ddf_log_error("Failed to allocate dispc structure\n"); 82 82 ddf_fun_destroy(fun); 83 83 return ENOMEM; 84 84 } 85 85 86 errno_t r c= amdm37x_dispc_init(dispc, vis);87 if (r c!= EOK) {88 ddf_log_error("Failed to init dispc: %s .", str_error(rc));86 errno_t ret = amdm37x_dispc_init(dispc, vis); 87 if (ret != EOK) { 88 ddf_log_error("Failed to init dispc: %s\n", str_error(ret)); 89 89 ddf_fun_destroy(fun); 90 return r c;90 return ret; 91 91 } 92 92 93 93 /* Bind function */ 94 r c= ddf_fun_bind(fun);95 if (r c!= EOK) {96 ddf_log_error("Failed to bind function: %s .", str_error(rc));94 ret = ddf_fun_bind(fun); 95 if (ret != EOK) { 96 ddf_log_error("Failed to bind function: %s\n", str_error(ret)); 97 97 amdm37x_dispc_fini(dispc); 98 98 ddf_fun_destroy(fun); 99 return r c;99 return ret; 100 100 } 101 ddf_fun_add_to_category(fun, "visualizer"); 101 102 102 rc = ddf_fun_add_to_category(fun, "visualizer"); 103 if (rc != EOK) { 104 ddf_log_error("Failed to add function: %s to visualizer " 105 "category.", str_error(rc)); 106 amdm37x_dispc_fini(dispc); 107 ddf_fun_unbind(fun); 108 ddf_fun_destroy(fun); 109 return rc; 110 } 111 112 ddf_log_note("Added device `%s'", ddf_dev_get_name(dev)); 103 ddf_log_note("Added device `%s'\n", ddf_dev_get_name(dev)); 113 104 return EOK; 114 105 }
Note:
See TracChangeset
for help on using the changeset viewer.