Skip to content

Commit

Permalink
clocksource/drivers/h8300_*: Remove unneeded memset()s
Browse files Browse the repository at this point in the history
Memory for timer16_priv, timer8_priv and tpu_priv structs is
allocated by devm_kzalloc() in corresponding probe functions
of drivers.
No need to zero it one more time.

Signed-off-by: Alexey Klimov <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
  • Loading branch information
Alexey Klimov authored and dlezcano committed Oct 15, 2015
1 parent 6eeb8c3 commit ba49af3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion drivers/clocksource/h8300_timer16.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ static int timer16_setup(struct timer16_priv *p, struct platform_device *pdev)
int ret, irq;
unsigned int ch;

memset(p, 0, sizeof(*p));
p->pdev = pdev;

res[REG_CH] = platform_get_resource(p->pdev,
Expand Down
1 change: 0 additions & 1 deletion drivers/clocksource/h8300_timer8.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ static int timer8_setup(struct timer8_priv *p,
int irq;
int ret;

memset(p, 0, sizeof(*p));
p->pdev = pdev;

res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0);
Expand Down
1 change: 0 additions & 1 deletion drivers/clocksource/h8300_tpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ static int __init tpu_setup(struct tpu_priv *p, struct platform_device *pdev)
{
struct resource *res[2];

memset(p, 0, sizeof(*p));
p->pdev = pdev;

res[CH_L] = platform_get_resource(p->pdev, IORESOURCE_MEM, CH_L);
Expand Down

0 comments on commit ba49af3

Please sign in to comment.