• Home
  • Raw
  • Download

Lines Matching refs:ret

40 	int found = 0, ret;  in get_debugfs()  local
62 ret = asprintf(path, "%s/gpio", mnt_fs_get_target(fs)); in get_debugfs()
63 if (ret < 0) in get_debugfs()
131 static struct gpiochip_info *list_gpiochip(const char *gpiochip_name, int *ret) in list_gpiochip() argument
148 *ret = -errno; in list_gpiochip()
151 *ret = 0; in list_gpiochip()
156 *ret = asprintf(&chrdev_name, "/dev/%s", ent->d_name); in list_gpiochip()
157 if (*ret < 0) in list_gpiochip()
162 *ret = -errno; in list_gpiochip()
167 *ret = ioctl(fd, GPIO_GET_CHIPINFO_IOCTL, current); in list_gpiochip()
168 if (*ret == -1) { in list_gpiochip()
175 *ret = 0; in list_gpiochip()
182 if ((!*ret && i == 0) || *ret < 0) { in list_gpiochip()
186 if (!*ret && i > 0) { in list_gpiochip()
188 *ret = i; in list_gpiochip()
194 if (*ret < 0) in list_gpiochip()
195 err(EXIT_FAILURE, "list gpiochip failed: %s", strerror(*ret)); in list_gpiochip()
207 int ret; in gpio_pin_test() local
210 ret = gpiotools_request_linehandle(cinfo->name, lines, 1, flag, &data, in gpio_pin_test()
212 if (ret < 0) in gpio_pin_test()
215 fd = ret; in gpio_pin_test()
217 ret = gpio_debugfs_get(CONSUMER, &debugfs_dir, &debugfs_value); in gpio_pin_test()
218 if (ret) { in gpio_pin_test()
219 ret = -EINVAL; in gpio_pin_test()
225 ret = -errno; in gpio_pin_test()
233 ret = -errno; in gpio_pin_test()
239 if (ret) in gpio_pin_test()
243 return ret; in gpio_pin_test()
281 int ret; in main() local
292 cinfo = list_gpiochip(prefix, &ret); in main()
294 if (!valid && ret == 0) { in main()
296 ret = 0; in main()
299 ret = -EINVAL; in main()
303 ret = -EINVAL; in main()
307 for (i = 0; i < ret; i++) { in main()
313 ret = 0; in main()
317 if (ret) in main()
323 if (ret) in main()
326 return ret; in main()