History

crypto: marvell/octeontx - Use kcalloc() instead of kzalloc()

Use 2-factor multiplication argument form kcalloc() instead of kzalloc().

Gustavo A. R. Silva committed 4 years ago

Commit 0b62b661 parent 61a13711 file · +1 −3Browse files

Unified · Split

drivers/crypto/marvell/octeontx/otx_cptvf_main.c+1−3
@@ -94,15 +94,13 @@ static int alloc_pending_queues(struct otx_cpt_pending_qinfo *pqinfo, u32 qlen, · 93 unmodified lines
9494 u32 num_queues)
9595 {
9696 struct otx_cpt_pending_queue *queue = NULL;
97− size_t size;
9897 int ret;
9998 u32 i;
10099
101100 pqinfo->num_queues = num_queues;
102− size = (qlen * sizeof(struct otx_cpt_pending_entry));
103101
104102 for_each_pending_queue(pqinfo, queue, i) {
105− queue->head = kzalloc((size), GFP_KERNEL);
103+ queue->head = kcalloc(qlen, sizeof(*queue->head), GFP_KERNEL);
106104 if (!queue->head) {
107105 ret = -ENOMEM;
108106 goto pending_qfail;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t