if (h.packet_type != AM7XXX_PACKET_TYPE_DEVINFO) {
error(dev->ctx, "expected packet type: %d, got %d instead!\n",
AM7XXX_PACKET_TYPE_DEVINFO, h.packet_type);
- errno = ENOTSUP;
- return -ENOTSUP;
+ errno = EINVAL;
+ return -EINVAL;
}
dev->device_info = malloc(sizeof(*dev->device_info));