Skip to content

Commit

Permalink
ATM-nicstar: Improve another size determination in get_scq()
Browse files Browse the repository at this point in the history
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
elfring authored and davem330 committed Sep 11, 2016
1 parent 7870612 commit 24310fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/atm/nicstar.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ static scq_info *get_scq(ns_dev *card, int size, u32 scd)
if (size != VBR_SCQSIZE && size != CBR_SCQSIZE)
return NULL;

scq = kmalloc(sizeof(scq_info), GFP_KERNEL);
scq = kmalloc(sizeof(*scq), GFP_KERNEL);
if (!scq)
return NULL;
scq->org = dma_alloc_coherent(&card->pcidev->dev,
Expand Down

0 comments on commit 24310fd

Please sign in to comment.