Skip to content

Commit

Permalink
iio: at91_adc: Cocci spatch "noderef"
Browse files Browse the repository at this point in the history
sizeof when applied to a pointer typed expression gives the size of the
pointer.
Found by coccinelle spatch "misc/noderef.cocci"

Signed-off-by: Thomas Meyer <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
thomasmey authored and jic23 committed Sep 20, 2013
1 parent 2bdb3af commit 4287723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/at91_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static int at91_adc_trigger_init(struct iio_dev *idev)
int i, ret;

st->trig = devm_kzalloc(&idev->dev,
st->trigger_number * sizeof(st->trig),
st->trigger_number * sizeof(*st->trig),
GFP_KERNEL);

if (st->trig == NULL) {
Expand Down

0 comments on commit 4287723

Please sign in to comment.