Changes in uspace/drv/fb/amdm37x_dispc/main.c [4122410:4f87a85a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/fb/amdm37x_dispc/main.c
r4122410 r4f87a85a 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 \n");62 ddf_log_error("Failed to create visualizer function."); 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 \n");68 ddf_log_error("Failed to allocate visualizer structure."); 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 \n");81 ddf_log_error("Failed to allocate dispc structure."); 82 82 ddf_fun_destroy(fun); 83 83 return ENOMEM; 84 84 } 85 85 86 errno_t r et= amdm37x_dispc_init(dispc, vis);87 if (r et!= EOK) {88 ddf_log_error("Failed to init dispc: %s \n", str_error(ret));86 errno_t rc = amdm37x_dispc_init(dispc, vis); 87 if (rc != EOK) { 88 ddf_log_error("Failed to init dispc: %s.", str_error(rc)); 89 89 ddf_fun_destroy(fun); 90 return r et;90 return rc; 91 91 } 92 92 93 93 /* Bind function */ 94 r et= ddf_fun_bind(fun);95 if (r et!= EOK) {96 ddf_log_error("Failed to bind function: %s \n", str_error(ret));94 rc = ddf_fun_bind(fun); 95 if (rc != EOK) { 96 ddf_log_error("Failed to bind function: %s.", str_error(rc)); 97 97 amdm37x_dispc_fini(dispc); 98 98 ddf_fun_destroy(fun); 99 return r et;99 return rc; 100 100 } 101 ddf_fun_add_to_category(fun, "visualizer");102 101 103 ddf_log_note("Added device `%s'\n", ddf_dev_get_name(dev)); 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)); 104 113 return EOK; 105 114 }
Note:
See TracChangeset
for help on using the changeset viewer.