diff options
-rw-r--r-- | lwis_allocator.c | 5 | ||||
-rw-r--r-- | lwis_buffer.c | 1 | ||||
-rw-r--r-- | lwis_debug.c | 8 | ||||
-rw-r--r-- | lwis_device.c | 6 | ||||
-rw-r--r-- | lwis_device_dpm.c | 1 | ||||
-rw-r--r-- | lwis_device_i2c.c | 1 | ||||
-rw-r--r-- | lwis_device_ioreg.c | 1 | ||||
-rw-r--r-- | lwis_device_slc.c | 1 | ||||
-rw-r--r-- | lwis_device_spi.c | 1 | ||||
-rw-r--r-- | lwis_device_test.c | 1 | ||||
-rw-r--r-- | lwis_device_top.c | 5 | ||||
-rw-r--r-- | lwis_dt.c | 5 | ||||
-rw-r--r-- | lwis_event.c | 7 | ||||
-rw-r--r-- | lwis_fence.c | 6 | ||||
-rw-r--r-- | lwis_gpio.c | 2 | ||||
-rw-r--r-- | lwis_i2c.c | 5 | ||||
-rw-r--r-- | lwis_i2c_bus_manager.c | 4 | ||||
-rw-r--r-- | lwis_interrupt.c | 3 | ||||
-rw-r--r-- | lwis_ioctl.c | 9 | ||||
-rw-r--r-- | lwis_periodic_io.c | 2 | ||||
-rw-r--r-- | lwis_phy.c | 2 | ||||
-rw-r--r-- | lwis_spi.c | 1 | ||||
-rw-r--r-- | lwis_transaction.c | 7 |
23 files changed, 0 insertions, 84 deletions
diff --git a/lwis_allocator.c b/lwis_allocator.c index 1ce5c75..48bf282 100644 --- a/lwis_allocator.c +++ b/lwis_allocator.c @@ -168,7 +168,6 @@ int lwis_allocator_init(struct lwis_device *lwis_dev) block_mgr = kzalloc(sizeof(struct lwis_allocator_block_mgr), GFP_KERNEL); if (block_mgr == NULL) { - dev_err(lwis_dev->dev, "Allocate block_mgr failed\n"); mutex_unlock(&lwis_dev->client_lock); return -ENOMEM; } @@ -300,7 +299,6 @@ void *lwis_allocator_allocate(struct lwis_device *lwis_dev, size_t size, gfp_t g if (idx > 19) { block = kmalloc(sizeof(struct lwis_allocator_block), gfp_flags); if (block == NULL) { - dev_err(lwis_dev->dev, "Allocate failed\n"); return NULL; } block->type = idx; @@ -308,7 +306,6 @@ void *lwis_allocator_allocate(struct lwis_device *lwis_dev, size_t size, gfp_t g block->prev = NULL; block->ptr = kvmalloc(size, gfp_flags); if (block->ptr == NULL) { - dev_err(lwis_dev->dev, "Allocate failed\n"); kfree(block); return NULL; } @@ -335,7 +332,6 @@ void *lwis_allocator_allocate(struct lwis_device *lwis_dev, size_t size, gfp_t g /* Allocate new block */ block = kmalloc(sizeof(struct lwis_allocator_block), gfp_flags); if (block == NULL) { - dev_err(lwis_dev->dev, "Allocate failed\n"); return NULL; } block->type = idx; @@ -344,7 +340,6 @@ void *lwis_allocator_allocate(struct lwis_device *lwis_dev, size_t size, gfp_t g block_size = 1 << idx; block->ptr = kvmalloc(block_size, gfp_flags); if (block->ptr == NULL) { - dev_err(lwis_dev->dev, "Allocate failed\n"); kfree(block); return NULL; } diff --git a/lwis_buffer.c b/lwis_buffer.c index 96b4471..a0af3e4 100644 --- a/lwis_buffer.c +++ b/lwis_buffer.c @@ -39,7 +39,6 @@ static struct lwis_buffer_enrollment_list *enrollment_list_create(struct lwis_cl struct lwis_buffer_enrollment_list *enrollment_list = kmalloc(sizeof(struct lwis_buffer_enrollment_list), GFP_KERNEL); if (!enrollment_list) { - dev_err(client->lwis_dev->dev, "Cannot allocate new entrollment list\n"); return NULL; } enrollment_list->vaddr = dma_vaddr; diff --git a/lwis_debug.c b/lwis_debug.c index f3f9501..72c8fec 100644 --- a/lwis_debug.c +++ b/lwis_debug.c @@ -388,7 +388,6 @@ int lwis_debug_print_register_io_history(struct lwis_device *lwis_dev) const size_t buffer_size = 10240; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate register io history log buffer\n"); return -ENOMEM; } @@ -427,7 +426,6 @@ int lwis_debug_print_event_states_info(struct lwis_device *lwis_dev, int lwis_ev const size_t buffer_size = 8192; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate event states log buffer\n"); return -ENOMEM; } @@ -449,7 +447,6 @@ int lwis_debug_print_transaction_info(struct lwis_device *lwis_dev) const size_t buffer_size = 10240; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate transaction info log buffer\n"); return -ENOMEM; } @@ -471,7 +468,6 @@ int lwis_debug_print_buffer_info(struct lwis_device *lwis_dev) const size_t buffer_size = 2048; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate buffer info log buffer\n"); return -ENOMEM; } @@ -530,7 +526,6 @@ static ssize_t event_states_read(struct file *fp, char __user *user_buf, size_t struct lwis_device *lwis_dev = fp->f_inode->i_private; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate event states log buffer\n"); return -ENOMEM; } @@ -554,7 +549,6 @@ static ssize_t transaction_info_read(struct file *fp, char __user *user_buf, siz struct lwis_device *lwis_dev = fp->f_inode->i_private; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate transaction info log buffer\n"); return -ENOMEM; } @@ -579,7 +573,6 @@ static ssize_t buffer_info_read(struct file *fp, char __user *user_buf, size_t c struct lwis_device *lwis_dev = fp->f_inode->i_private; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate buffer info log buffer\n"); return -ENOMEM; } @@ -604,7 +597,6 @@ static ssize_t register_io_history_read(struct file *fp, char __user *user_buf, struct lwis_device *lwis_dev = fp->f_inode->i_private; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate register io history log buffer\n"); return -ENOMEM; } diff --git a/lwis_device.c b/lwis_device.c index ab1f437..1613684 100644 --- a/lwis_device.c +++ b/lwis_device.c @@ -113,7 +113,6 @@ static int lwis_open(struct inode *node, struct file *fp) lwis_client = kzalloc(sizeof(struct lwis_client), GFP_KERNEL); if (!lwis_client) { - dev_err(lwis_dev->dev, "Failed to allocate lwis client\n"); return -ENOMEM; } @@ -366,7 +365,6 @@ static ssize_t lwis_read(struct file *fp, char __user *user_buf, size_t count, l const size_t buffer_size = 8192; char *buffer = kzalloc(buffer_size, GFP_KERNEL); if (!buffer) { - pr_err("Failed to allocate read buffer\n"); return -ENOMEM; } @@ -1312,15 +1310,12 @@ struct lwis_device_power_sequence_list *lwis_dev_power_seq_list_alloc(int count) list = kmalloc(sizeof(struct lwis_device_power_sequence_list), GFP_KERNEL); if (!list) { - pr_err("Failed to allocate power sequence list\n"); return ERR_PTR(-ENOMEM); } list->seq_info = kmalloc(count * sizeof(struct lwis_device_power_sequence_info), GFP_KERNEL); if (!list->seq_info) { - pr_err("Failed to allocate lwis_device_power_sequence_info " - "instances\n"); kfree(list); return ERR_PTR(-ENOMEM); } @@ -1635,7 +1630,6 @@ static int __init lwis_register_base_device(void) /* Allocate ID management instance for device minor numbers */ core.idr = kzalloc(sizeof(struct idr), GFP_KERNEL); if (!core.idr) { - pr_err("Cannot allocate idr instance\n"); return -ENOMEM; } diff --git a/lwis_device_dpm.c b/lwis_device_dpm.c index 15bc782..42b2115 100644 --- a/lwis_device_dpm.c +++ b/lwis_device_dpm.c @@ -200,7 +200,6 @@ static int lwis_dpm_device_probe(struct platform_device *plat_dev) /* Allocate top device specific data construct */ dpm_dev = devm_kzalloc(dev, sizeof(struct lwis_dpm_device), GFP_KERNEL); if (!dpm_dev) { - dev_err(dev, "Failed to allocate dpm device structure\n"); return -ENOMEM; } diff --git a/lwis_device_i2c.c b/lwis_device_i2c.c index bc9b9ee..be2af79 100644 --- a/lwis_device_i2c.c +++ b/lwis_device_i2c.c @@ -243,7 +243,6 @@ static int lwis_i2c_device_probe(struct platform_device *plat_dev) /* Allocate I2C device specific data construct */ i2c_dev = devm_kzalloc(dev, sizeof(struct lwis_i2c_device), GFP_KERNEL); if (!i2c_dev) { - dev_err(dev, "Failed to allocate i2c device structure\n"); return -ENOMEM; } diff --git a/lwis_device_ioreg.c b/lwis_device_ioreg.c index 99b9bad..aba34ba 100644 --- a/lwis_device_ioreg.c +++ b/lwis_device_ioreg.c @@ -105,7 +105,6 @@ static int lwis_ioreg_device_probe(struct platform_device *plat_dev) /* Allocate IOREG device specific data construct */ ioreg_dev = devm_kzalloc(dev, sizeof(struct lwis_ioreg_device), GFP_KERNEL); if (!ioreg_dev) { - dev_err(dev, "Failed to allocate IOREG device structure\n"); return -ENOMEM; } diff --git a/lwis_device_slc.c b/lwis_device_slc.c index 1b65a8e..59c2e50 100644 --- a/lwis_device_slc.c +++ b/lwis_device_slc.c @@ -255,7 +255,6 @@ static int lwis_slc_device_probe(struct platform_device *plat_dev) /* Allocate SLC device specific data construct */ slc_dev = devm_kzalloc(dev, sizeof(struct lwis_slc_device), GFP_KERNEL); if (!slc_dev) { - dev_err(dev, "Failed to allocate slc device structure\n"); return -ENOMEM; } diff --git a/lwis_device_spi.c b/lwis_device_spi.c index 36e06f6..5a81cc5 100644 --- a/lwis_device_spi.c +++ b/lwis_device_spi.c @@ -117,7 +117,6 @@ static int lwis_spi_device_probe(struct spi_device *spi) /* Allocate SPI device specific data construct */ spi_dev = devm_kzalloc(dev, sizeof(*spi_dev), GFP_KERNEL); if (!spi_dev) { - dev_err(dev, "Failed to allocate spi device structure\n"); return -ENOMEM; } diff --git a/lwis_device_test.c b/lwis_device_test.c index 9dcfa74..1834a31 100644 --- a/lwis_device_test.c +++ b/lwis_device_test.c @@ -159,7 +159,6 @@ static int lwis_test_device_probe(struct platform_device *plat_dev) /* Allocate test device specific data construct */ test_dev = devm_kzalloc(dev, sizeof(struct lwis_test_device), GFP_KERNEL); if (!test_dev) { - dev_err(dev, "Failed to allocate TEST device structure\n"); return -ENOMEM; } diff --git a/lwis_device_top.c b/lwis_device_top.c index fbd1522..61473b7 100644 --- a/lwis_device_top.c +++ b/lwis_device_top.c @@ -116,7 +116,6 @@ static struct lwis_event_subscriber_list *event_subscriber_list_create(struct lw struct lwis_event_subscriber_list *event_subscriber_list = kmalloc(sizeof(struct lwis_event_subscriber_list), GFP_KERNEL); if (!event_subscriber_list) { - dev_err(lwis_dev->dev, "Can't allocate event subscriber list\n"); return NULL; } event_subscriber_list->trigger_event_id = trigger_event_id; @@ -182,7 +181,6 @@ static void lwis_top_event_notify(struct lwis_device *lwis_dev, int64_t trigger_ struct lwis_trigger_event_info *trigger_event = kmalloc(sizeof(struct lwis_trigger_event_info), GFP_ATOMIC); if (trigger_event == NULL) { - dev_err(lwis_top_dev->base_dev.dev, "Allocate trigger_event_info failed"); return; } @@ -243,8 +241,6 @@ static int lwis_top_event_subscribe(struct lwis_device *lwis_dev, int64_t trigge /* If the subscription does not exist in hash table, create one */ new_subscription = kmalloc(sizeof(struct lwis_event_subscribe_info), GFP_KERNEL); if (!new_subscription) { - dev_err(lwis_top_dev->base_dev.dev, - "Failed to allocate memory for new subscription\n"); return -ENOMEM; } INIT_LIST_HEAD(&new_subscription->list_node); @@ -485,7 +481,6 @@ static int lwis_top_device_probe(struct platform_device *plat_dev) /* Allocate top device specific data construct */ top_dev = devm_kzalloc(dev, sizeof(struct lwis_top_device), GFP_KERNEL); if (!top_dev) { - dev_err(dev, "Failed to allocate top device structure\n"); return -ENOMEM; } @@ -120,7 +120,6 @@ static int parse_irq_gpios(struct lwis_device *lwis_dev) irq_gpios_names = kmalloc(LWIS_MAX_NAME_STRING_LEN * name_count, GFP_KERNEL); if (IS_ERR_OR_NULL(irq_gpios_names)) { - pr_err("Allocating event list failed\n"); ret = -ENOMEM; goto error_parse_irq_gpios; } @@ -137,7 +136,6 @@ static int parse_irq_gpios(struct lwis_device *lwis_dev) irq_gpios_types = kmalloc(sizeof(u32) * type_count, GFP_KERNEL); if (IS_ERR_OR_NULL(irq_gpios_types)) { - pr_err("Allocating irq_gpios_types list failed\n"); ret = -ENOMEM; goto error_parse_irq_gpios; } @@ -153,7 +151,6 @@ static int parse_irq_gpios(struct lwis_device *lwis_dev) irq_gpios_events = kmalloc(sizeof(u64) * event_count, GFP_KERNEL); if (IS_ERR_OR_NULL(irq_gpios_events)) { - pr_err("Allocating event list failed\n"); ret = -ENOMEM; goto error_parse_irq_gpios; } @@ -431,7 +428,6 @@ static int parse_irq_reg_bits(struct device_node *info, int *bits_num_result, u3 int_reg_bits = kmalloc(sizeof(u32) * int_reg_bits_num, GFP_KERNEL); if (IS_ERR_OR_NULL(int_reg_bits)) { - pr_err("Failed to allocate memory for irq regiater bits\n"); return -ENOMEM; } @@ -464,7 +460,6 @@ static int parse_critical_irq_events(struct device_node *event_info, u64 **irq_e *irq_events = kmalloc(sizeof(u64) * critical_irq_events_num, GFP_KERNEL); if (*irq_events == NULL) { - pr_err("Failed to allocate memory for critical events\n"); return 0; } diff --git a/lwis_event.c b/lwis_event.c index 971d70a..84164fb 100644 --- a/lwis_event.c +++ b/lwis_event.c @@ -115,8 +115,6 @@ lwis_client_event_state_find_or_create(struct lwis_client *lwis_client, int64_t new_state = kmalloc(sizeof(struct lwis_client_event_state), GFP_ATOMIC); /* Oh no, ENOMEM */ if (!new_state) { - dev_err(lwis_client->lwis_dev->dev, - "Could not allocate lwis_client_event_state\n"); return ERR_PTR(-ENOMEM); } /* Set the event_id and initialize flags to 0 which pretty much @@ -245,7 +243,6 @@ struct lwis_device_event_state *lwis_device_event_state_find_or_create(struct lw new_state = kmalloc(sizeof(struct lwis_device_event_state), GFP_ATOMIC); /* Oh no, ENOMEM */ if (!new_state) { - dev_err(lwis_dev->dev, "Could not allocate lwis_device_event_state\n"); return ERR_PTR(-ENOMEM); } /* Set the event_id and initialize ref counter to 0 which means @@ -893,7 +890,6 @@ static int lwis_device_event_emit_impl(struct lwis_device *lwis_dev, int64_t eve if (emit) { event = kmalloc(sizeof(struct lwis_event_entry) + payload_size, GFP_ATOMIC); if (!event) { - dev_err(lwis_dev->dev, "Failed to allocate event entry\n"); return -ENOMEM; } @@ -964,7 +960,6 @@ int lwis_pending_event_push(struct list_head *pending_events, int64_t event_id, event = kzalloc(sizeof(struct lwis_event_entry) + payload_size, GFP_ATOMIC); if (!event) { - pr_err("Failed to allocate event entry\n"); return -ENOMEM; } event->event_info.event_id = event_id; @@ -1080,7 +1075,6 @@ void lwis_device_external_event_emit(struct lwis_device *lwis_dev, int64_t event if (emit) { event = kmalloc(sizeof(struct lwis_event_entry), GFP_ATOMIC); if (!event) { - dev_err(lwis_dev->dev, "Failed to allocate event entry\n"); return; } @@ -1133,7 +1127,6 @@ void lwis_device_error_event_emit(struct lwis_device *lwis_dev, int64_t event_id event = kmalloc(sizeof(struct lwis_event_entry) + payload_size, GFP_ATOMIC); if (!event) { - dev_err(lwis_dev->dev, "Failed to allocate event entry\n"); return; } event->event_info.event_id = event_id; diff --git a/lwis_fence.c b/lwis_fence.c index 0afa073..125a893 100644 --- a/lwis_fence.c +++ b/lwis_fence.c @@ -221,7 +221,6 @@ int lwis_fence_create(struct lwis_device *lwis_dev) /* Allocate a new instance of lwis_fence struct */ new_fence = kmalloc(sizeof(struct lwis_fence), GFP_ATOMIC); if (!new_fence) { - dev_err(lwis_dev->dev, "Failed to allocate lwis_fence at creating new fence\n"); return -ENOMEM; } @@ -264,7 +263,6 @@ transaction_list_create(struct lwis_fence *fence, struct lwis_client *owner) struct lwis_fence_trigger_transaction_list *tx_list = kmalloc(sizeof(struct lwis_fence_trigger_transaction_list), GFP_ATOMIC); if (!tx_list) { - dev_err(fence->lwis_top_dev->dev, "Cannot allocate new event list\n"); return NULL; } tx_list->owner = owner; @@ -312,8 +310,6 @@ static int lwis_trigger_fence_add_transaction(int fence_fd, struct lwis_client * pending_transaction_id = kmalloc(sizeof(struct lwis_pending_transaction_id), GFP_ATOMIC); if (!pending_transaction_id) { fput(fp); - dev_err(client->lwis_dev->dev, - "Failed to allocate lwis_pending_transaction_id at adding transactions to fence\n"); return -ENOMEM; } pending_transaction_id->id = transaction->info.id; @@ -615,8 +611,6 @@ struct lwis_fence_pending_signal *lwis_fence_pending_signal_create(struct lwis_f struct lwis_fence_pending_signal *pending_fence_signal = kmalloc(sizeof(struct lwis_fence_pending_signal), GFP_ATOMIC); if (!pending_fence_signal) { - dev_err(fence->lwis_top_dev->dev, - "Cannot allocate new fence pending signal list\n"); return NULL; } pending_fence_signal->fp = fp; diff --git a/lwis_gpio.c b/lwis_gpio.c index 764b075..bfa5a71 100644 --- a/lwis_gpio.c +++ b/lwis_gpio.c @@ -113,13 +113,11 @@ struct lwis_gpios_list *lwis_gpios_list_alloc(int count) list = kmalloc(sizeof(struct lwis_gpios_list), GFP_KERNEL); if (!list) { - pr_err("Failed to allocate gpios list\n"); return ERR_PTR(-ENOMEM); } list->gpios_info = kmalloc(count * sizeof(struct lwis_gpios_info), GFP_KERNEL); if (!list->gpios_info) { - pr_err("Failed to allocate lwis_gpios_info instances\n"); kfree(list); return ERR_PTR(-ENOMEM); } @@ -157,13 +157,11 @@ static int i2c_read(struct lwis_i2c_device *i2c, uint64_t offset, uint64_t *valu wbuf = kmalloc(offset_bytes, GFP_KERNEL); if (!wbuf) { - dev_err(i2c->base_dev.dev, "Failed to allocate memory for i2c write buffer\n"); return -ENOMEM; } rbuf = kmalloc(value_bytes, GFP_KERNEL); if (!rbuf) { - dev_err(i2c->base_dev.dev, "Failed to allocate memory for i2c read buffer\n"); ret = -ENOMEM; goto error_rbuf_alloc; } @@ -235,7 +233,6 @@ static int i2c_write(struct lwis_i2c_device *i2c, uint64_t offset, uint64_t valu msg_bytes = offset_bytes + value_bytes; buf = kmalloc(msg_bytes, GFP_KERNEL); if (!buf) { - dev_err(i2c->base_dev.dev, "Failed to allocate memory for i2c buffer\n"); return -ENOMEM; } @@ -282,7 +279,6 @@ static int i2c_read_batch(struct lwis_i2c_device *i2c, uint64_t start_offset, ui wbuf = kmalloc(offset_bytes, GFP_KERNEL); if (!wbuf) { - dev_err(i2c->base_dev.dev, "Failed to allocate memory for i2c write buffer\n"); return -ENOMEM; } @@ -339,7 +335,6 @@ static int i2c_write_batch(struct lwis_i2c_device *i2c, uint64_t start_offset, u msg_bytes = offset_bytes + write_buf_size; buf = kmalloc(msg_bytes, GFP_KERNEL); if (!buf) { - dev_err(i2c->base_dev.dev, "Failed to allocate memory for i2c buffer\n"); return -ENOMEM; } diff --git a/lwis_i2c_bus_manager.c b/lwis_i2c_bus_manager.c index 04711f7..87310b8 100644 --- a/lwis_i2c_bus_manager.c +++ b/lwis_i2c_bus_manager.c @@ -35,7 +35,6 @@ static int insert_bus_manager_id_in_list(struct lwis_i2c_bus_manager *i2c_bus_ma i2c_bus_manager_identifier_node = kzalloc(sizeof(struct lwis_i2c_bus_manager_identifier), GFP_KERNEL); if (!i2c_bus_manager_identifier_node) { - pr_err("Failed to allocate lwis i2c bus manager id list node\n"); return -ENOMEM; } @@ -251,7 +250,6 @@ static int connect_i2c_bus_manager(struct lwis_i2c_bus_manager *i2c_bus_manager, connected_i2c_device = kzalloc(sizeof(struct lwis_i2c_connected_device), GFP_KERNEL); if (!connected_i2c_device) { - dev_err(lwis_dev->dev, "Failed to connect device to I2C Bus Manager\n"); return -ENOMEM; } connected_i2c_device->connected_device = lwis_dev; @@ -355,7 +353,6 @@ int lwis_i2c_bus_manager_create(struct lwis_i2c_device *i2c_dev) /* Allocate memory for I2C Bus Manager */ i2c_bus_manager = kzalloc(sizeof(struct lwis_i2c_bus_manager), GFP_KERNEL); if (!i2c_bus_manager) { - dev_err(i2c_base_device->dev, "Failed to allocate lwis i2c bus manager\n"); return -ENOMEM; } @@ -627,7 +624,6 @@ int lwis_i2c_bus_manager_connect_client(struct lwis_client *connecting_client) i2c_connecting_client_node = kzalloc(sizeof(struct lwis_i2c_process_request), GFP_ATOMIC); if (!i2c_connecting_client_node) { - dev_err(lwis_dev->dev, "Failed to connect client to I2C Bus Manager\n"); return -ENOMEM; } i2c_connecting_client_node->requesting_client = connecting_client; diff --git a/lwis_interrupt.c b/lwis_interrupt.c index ba660eb..1bcb8dd 100644 --- a/lwis_interrupt.c +++ b/lwis_interrupt.c @@ -51,13 +51,11 @@ struct lwis_interrupt_list *lwis_interrupt_list_alloc(struct lwis_device *lwis_d list = kmalloc(sizeof(struct lwis_interrupt_list), GFP_KERNEL); if (!list) { - pr_err("Failed to allocate IRQ list\n"); return ERR_PTR(-ENOMEM); } list->irq = kmalloc(count * sizeof(struct lwis_interrupt), GFP_KERNEL); if (!list->irq) { - pr_err("Failed to allocate IRQs\n"); kfree(list); return ERR_PTR(-ENOMEM); } @@ -656,7 +654,6 @@ int lwis_interrupt_set_gpios_event_info(struct lwis_interrupt_list *list, int in new_event = kzalloc(sizeof(struct lwis_single_event_info), GFP_KERNEL); if (!new_event) { - dev_err(list->lwis_dev->dev, "Allocate event info failed\n"); return -ENOMEM; } diff --git a/lwis_ioctl.c b/lwis_ioctl.c index 4cdc2cb..deba9ba 100644 --- a/lwis_ioctl.c +++ b/lwis_ioctl.c @@ -348,7 +348,6 @@ static int cmd_echo(struct lwis_device *lwis_dev, struct lwis_cmd_pkt *header, buffer = kmalloc(echo_msg.msg.size + 1, GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate buffer for echo message\n"); header->ret_code = -ENOMEM; return copy_pkt_to_user(lwis_dev, u_msg, (void *)header, sizeof(*header)); } @@ -775,7 +774,6 @@ static int cmd_dma_buffer_enroll(struct lwis_client *lwis_client, struct lwis_cm buffer = kmalloc(sizeof(*buffer), GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocate lwis_enrolled_buffer struct\n"); header->ret_code = -ENOMEM; return copy_pkt_to_user(lwis_dev, u_msg, (void *)header, sizeof(*header)); } @@ -879,7 +877,6 @@ static int cmd_dma_buffer_alloc(struct lwis_client *lwis_client, struct lwis_cmd buffer = kmalloc(sizeof(*buffer), GFP_KERNEL); if (!buffer) { - dev_err(lwis_dev->dev, "Failed to allocated lwis_allocated_buffer\n"); return -ENOMEM; } @@ -1016,7 +1013,6 @@ static int cmd_event_control_set(struct lwis_client *lwis_client, struct lwis_cm } k_event_controls = kmalloc(buf_size, GFP_KERNEL); if (!k_event_controls) { - dev_err(lwis_dev->dev, "Failed to allocate event controls\n"); header->ret_code = -ENOMEM; return copy_pkt_to_user(lwis_dev, u_msg, (void *)header, sizeof(*header)); } @@ -1163,7 +1159,6 @@ static int construct_transaction_from_cmd(struct lwis_client *client, uint32_t c k_transaction = kmalloc(sizeof(*k_transaction), GFP_KERNEL); if (!k_transaction) { - dev_err(lwis_dev->dev, "Failed to allocate transaction info\n"); return -ENOMEM; } @@ -1409,7 +1404,6 @@ static int construct_periodic_io_from_cmd(struct lwis_client *client, k_periodic_io = kmalloc(sizeof(struct lwis_periodic_io), GFP_KERNEL); if (!k_periodic_io) { - dev_err(lwis_dev->dev, "Failed to allocate periodic io\n"); return -ENOMEM; } @@ -1515,7 +1509,6 @@ static int cmd_dpm_clk_update(struct lwis_device *lwis_dev, struct lwis_cmd_pkt } clk_settings = kmalloc(buf_size, GFP_KERNEL); if (!clk_settings) { - dev_err(lwis_dev->dev, "Failed to allocate clock settings\n"); ret = -ENOMEM; goto exit; } @@ -1563,7 +1556,6 @@ static int cmd_dpm_qos_update(struct lwis_device *lwis_dev, struct lwis_cmd_pkt } k_qos_settings = kmalloc(buf_size, GFP_KERNEL); if (!k_qos_settings) { - dev_err(lwis_dev->dev, "Failed to allocate qos settings\n"); ret = -ENOMEM; goto exit; } @@ -1626,7 +1618,6 @@ static int cmd_dpm_qos_update_v2(struct lwis_device *lwis_dev, struct lwis_cmd_p } k_qos_settings = kmalloc(buf_size, GFP_KERNEL); if (!k_qos_settings) { - dev_err(lwis_dev->dev, "Failed to allocate qos settings\n"); ret = -ENOMEM; goto exit; } diff --git a/lwis_periodic_io.c b/lwis_periodic_io.c index 36c010d..5faf991 100644 --- a/lwis_periodic_io.c +++ b/lwis_periodic_io.c @@ -103,7 +103,6 @@ static struct lwis_periodic_io_list *periodic_io_list_create_locked(struct lwis_ struct lwis_periodic_io_list *periodic_io_list = kmalloc(sizeof(struct lwis_periodic_io_list), GFP_ATOMIC); if (!periodic_io_list) { - dev_err(lwis_dev->dev, "Cannot allocate new event list\n"); return NULL; } @@ -412,7 +411,6 @@ static int prepare_response(struct lwis_client *client, struct lwis_periodic_io read_buf_size * info->batch_size; periodic_io->resp = kmalloc(resp_size, GFP_KERNEL); if (!periodic_io->resp) { - pr_err_ratelimited("Cannot allocate periodic io response\n"); return -ENOMEM; } periodic_io->resp->batch_size = 0; @@ -26,13 +26,11 @@ struct lwis_phy_list *lwis_phy_list_alloc(int count) list = kmalloc(sizeof(struct lwis_phy_list), GFP_KERNEL); if (!list) { - pr_err("Failed to allocate PHY list\n"); return ERR_PTR(-ENOMEM); } list->phy = kzalloc(count * sizeof(struct phy), GFP_KERNEL); if (!list->phy) { - pr_err("Failed to allocate PHY instances\n"); kfree(list); return ERR_PTR(-ENOMEM); } @@ -267,7 +267,6 @@ static int lwis_spi_write_batch(struct lwis_spi_device *spi_dev, uint64_t offset msg_bytes = offset_bytes + write_buf_size; buf = kmalloc(msg_bytes, GFP_KERNEL); if (!buf) { - dev_err(spi_dev->base_dev.dev, "Failed to allocate memory for SPI buffer\n"); return -ENOMEM; } diff --git a/lwis_transaction.c b/lwis_transaction.c index d342e34..1bff770 100644 --- a/lwis_transaction.c +++ b/lwis_transaction.c @@ -56,7 +56,6 @@ static struct lwis_transaction_event_list *event_list_create(struct lwis_client struct lwis_transaction_event_list *event_list = kmalloc(sizeof(struct lwis_transaction_event_list), GFP_ATOMIC); if (!event_list) { - dev_err(client->lwis_dev->dev, "Cannot allocate new event list\n"); return NULL; } event_list->event_id = event_id; @@ -717,7 +716,6 @@ int lwis_trigger_event_add_weak_transaction(struct lwis_client *client, int64_t weak_transaction = kmalloc(sizeof(struct lwis_transaction), GFP_ATOMIC); if (!weak_transaction) { - dev_err(client->lwis_dev->dev, "Cannot allocate weak transaction\n"); return -ENOMEM; } weak_transaction->is_weak_transaction = true; @@ -869,7 +867,6 @@ static int prepare_response_locked(struct lwis_client *client, struct lwis_trans * holding onto a spinlock. */ transaction->resp = kmalloc(resp_size, GFP_ATOMIC); if (!transaction->resp) { - dev_err(client->lwis_dev->dev, "Cannot allocate transaction response\n"); return -ENOMEM; } transaction->resp->id = info->id; @@ -951,8 +948,6 @@ new_repeating_transaction_iteration(struct lwis_client *client, /* Construct a new instance for repeating transactions */ new_instance = kmalloc(sizeof(struct lwis_transaction), GFP_ATOMIC); if (!new_instance) { - dev_err(client->lwis_dev->dev, - "Failed to allocate repeating transaction instance\n"); return NULL; } memcpy(&new_instance->info, &transaction->info, sizeof(transaction->info)); @@ -963,8 +958,6 @@ new_repeating_transaction_iteration(struct lwis_client *client, GFP_ATOMIC); if (!resp_buf) { kfree(new_instance); - dev_err(client->lwis_dev->dev, - "Failed to allocate repeating transaction response\n"); return NULL; } memcpy(resp_buf, transaction->resp, sizeof(struct lwis_transaction_response_header)); |