| 617 | } |
| 618 | |
| 619 | int |
| 620 | ccp_probe_device(struct rte_pci_device *pci_dev) |
| 621 | { |
| 622 | struct ccp_device *ccp_dev; |
| 623 | |
| 624 | ccp_dev = rte_zmalloc("ccp_device", sizeof(*ccp_dev), |
| 625 | RTE_CACHE_LINE_SIZE); |
| 626 | if (ccp_dev == NULL) |
| 627 | goto fail; |
| 628 | |
| 629 | ccp_dev->pci = pci_dev; |
| 630 | |
| 631 | /* device is valid, add in list */ |
| 632 | if (ccp_add_device(ccp_dev)) { |
| 633 | ccp_remove_device(ccp_dev); |
| 634 | goto fail; |
| 635 | } |
| 636 | |
| 637 | return 0; |
| 638 | fail: |
| 639 | CCP_LOG_ERR("CCP Device probe failed"); |
| 640 | rte_free(ccp_dev); |
| 641 | return -1; |
| 642 | } |
no test coverage detected