Lines Matching refs:ret

44 	int ret;
46 ret = gb_pm_runtime_get_sync(ghid->bundle);
47 if (ret)
48 return ret;
50 ret = gb_operation_sync(ghid->connection, GB_HID_TYPE_GET_REPORT_DESC,
56 return ret;
61 int ret;
63 ret = gb_pm_runtime_get_sync(ghid->bundle);
64 if (ret)
65 return ret;
67 ret = gb_operation_sync(ghid->connection, type, NULL, 0, NULL, 0);
71 return ret;
78 int ret;
80 ret = gb_pm_runtime_get_sync(ghid->bundle);
81 if (ret)
82 return ret;
87 ret = gb_operation_sync(ghid->connection, GB_HID_TYPE_GET_REPORT,
92 return ret;
100 int ret, size = sizeof(*request) + len - 1;
102 ret = gb_pm_runtime_get_sync(ghid->bundle);
103 if (ret)
104 return ret;
119 ret = gb_operation_request_send_sync(operation);
120 if (ret) {
122 "failed to set report: %d\n", ret);
124 ret = len;
130 return ret;
228 int ret;
233 ret = gb_hid_get_report(ghid, report_type, report_number, buf, count);
234 if (!ret)
235 ret = count;
237 return ret;
245 int ret;
255 ret = gb_hid_set_report(ghid, report_type, report_id, buf, len);
256 if (report_id && ret >= 0)
257 ret++; /* add report_id to the number of transferred bytes */
284 int ret;
296 ret = gb_hid_get_report_desc(ghid, rdesc);
297 if (ret) {
302 ret = hid_parse_report(hid, rdesc, rsize);
303 if (ret)
309 return ret;
316 int ret;
325 ret = gb_hid_alloc_buffers(ghid, bufsize);
326 if (ret)
327 return ret;
345 int ret;
347 ret = gb_hid_set_power(ghid, GB_HID_TYPE_PWR_ON);
348 if (ret < 0)
349 return ret;
358 int ret;
363 ret = gb_hid_set_power(ghid, GB_HID_TYPE_PWR_OFF);
364 if (ret)
366 "failed to power off (%d)\n", ret);
397 int ret;
399 ret = gb_hid_get_desc(ghid);
400 if (ret)
401 return ret;
428 int ret;
444 ret = PTR_ERR(connection);
453 ret = PTR_ERR(hid);
462 ret = gb_connection_enable(connection);
463 if (ret)
466 ret = gb_hid_init(ghid);
467 if (ret)
470 ret = hid_add_device(hid);
471 if (ret) {
472 hid_err(hid, "can't add hid device: %d\n", ret);
489 return ret;