aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/qat
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2024-09-03 10:25:32 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2024-09-03 10:25:32 +0000
commit866dc4bd81398b478daefe4b7447b92422b4a06c (patch)
treed6da90eb74eea8fdbd1cecfb998ea64fd0b8fa1d /sys/dev/qat
parent4fb8a80a78aa65e0b30bd5a74373512c678841c9 (diff)
Diffstat (limited to 'sys/dev/qat')
-rw-r--r--sys/dev/qat/qat_common/adf_freebsd_dev_processes.c8
-rw-r--r--sys/dev/qat/qat_common/adf_freebsd_uio.c8
-rw-r--r--sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c3
-rw-r--r--sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c5
4 files changed, 0 insertions, 24 deletions
diff --git a/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c b/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c
index b8a17344bdea..a70f25d57dcb 100644
--- a/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c
+++ b/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c
@@ -146,8 +146,6 @@ adf_processes_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
return ENXIO;
}
prv_data = malloc(sizeof(*prv_data), M_QAT, M_WAITOK | M_ZERO);
- if (!prv_data)
- return ENOMEM;
INIT_LIST_HEAD(&prv_data->list);
error = devfs_set_cdevpriv(prv_data, adf_processes_release);
if (error) {
@@ -573,14 +571,8 @@ adf_state_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
int ret = 0;
prv_data = malloc(sizeof(*prv_data), M_QAT, M_WAITOK | M_ZERO);
- if (!prv_data)
- return -ENOMEM;
entry_proc_events =
malloc(sizeof(struct entry_proc_events), M_QAT, M_WAITOK | M_ZERO);
- if (!entry_proc_events) {
- free(prv_data, M_QAT);
- return -ENOMEM;
- }
mtx_lock(&mtx);
prv_data->cdev = dev;
prv_data->cdev->si_drv1 = prv_data;
diff --git a/sys/dev/qat/qat_common/adf_freebsd_uio.c b/sys/dev/qat/qat_common/adf_freebsd_uio.c
index c109fc79b0f4..64efde72b4b8 100644
--- a/sys/dev/qat/qat_common/adf_freebsd_uio.c
+++ b/sys/dev/qat/qat_common/adf_freebsd_uio.c
@@ -199,10 +199,6 @@ adf_alloc_bundle(struct adf_accel_dev *accel_dev, int bundle_nr)
accel = accel_dev->accel;
handle = malloc(sizeof(*handle), M_QAT, M_WAITOK | M_ZERO);
- if (!handle) {
- printf("ERROR in adf_alloc_bundle %d\n", __LINE__);
- return ENOMEM;
- }
handle->accel = accel;
handle->bundle = bundle_nr;
@@ -294,10 +290,6 @@ adf_uio_mmap_single(struct cdev *dev,
/* Adding pid to bundle list */
instance_rings =
malloc(sizeof(*instance_rings), M_QAT, M_WAITOK | M_ZERO);
- if (!instance_rings) {
- printf("QAT: Memory allocation error - line: %d\n", __LINE__);
- return -ENOMEM;
- }
instance_rings->user_pid = curproc->p_pid;
instance_rings->ring_mask = 0;
mutex_lock(&bundle->list_lock);
diff --git a/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c b/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c
index 6fb4cf0bf2f7..954e31c683ce 100644
--- a/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c
+++ b/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c
@@ -123,9 +123,6 @@ get_orphan_bundle(int bank,
orphan_bundle =
malloc(sizeof(*orphan_bundle), M_QAT, M_WAITOK | M_ZERO);
- if (!orphan_bundle)
- return ENOMEM;
-
csr_base = accel->bar->virt_addr;
orphan_bundle->csr_base = csr_base;
orphan_bundle->bank = bank;
diff --git a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c
index 05a99ae43ab7..9b66ae4b2370 100644
--- a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c
+++ b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c
@@ -117,11 +117,6 @@ adf_attach(device_t dev)
}
/* Allocate and configure device configuration structure */
hw_data = malloc(sizeof(*hw_data), M_QAT_4XXXVF, M_WAITOK | M_ZERO);
- if (!hw_data) {
- ret = -ENOMEM;
- goto out_err;
- }
-
accel_dev->hw_device = hw_data;
adf_init_hw_data_4xxxiov(accel_dev->hw_device);
accel_pci_dev->revid = pci_get_revid(dev);