@@ -1036,13 +1036,13 @@ static int isi_formats_init(struct atmel_isi *isi)
isi->num_user_formats = num_fmts;
isi->user_formats = devm_kcalloc(isi->dev,
- num_fmts, sizeof(struct isi_format *),
+ num_fmts, sizeof(*isi->user_formats),
GFP_KERNEL);
if (!isi->user_formats)
return -ENOMEM;
memcpy(isi->user_formats, isi_fmts,
- num_fmts * sizeof(struct isi_format *));
+ num_fmts * sizeof(*isi->user_formats));
isi->current_fmt = isi->user_formats[0];
return 0;
@@ -1173,5 +1173,5 @@ static int atmel_isi_probe(struct platform_device *pdev)
struct resource *regs;
int ret, i;
- isi = devm_kzalloc(&pdev->dev, sizeof(struct atmel_isi), GFP_KERNEL);
+ isi = devm_kzalloc(&pdev->dev, sizeof(*isi), GFP_KERNEL);
if (!isi)