mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 08:12:27 -04:00
qat(4): Stop checking for failures from malloc(M_WAITOK)
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852
This commit is contained in:
parent
4fb8a80a78
commit
866dc4bd81
4 changed files with 0 additions and 24 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue