clocksource/drivers/timer-atmel-pit: Properly handle error cases
authorAlexandre Belloni <[email protected]>
Wed, 25 Apr 2018 10:14:39 +0000 (12:14 +0200)
committerDaniel Lezcano <[email protected]>
Thu, 27 Sep 2018 10:01:45 +0000 (12:01 +0200)
commit52bf4a900d9cede3eb14982d0f2c5e6db6d97cc3
tree906874b02bd01b43125047dc82aa700226c94cdb
parent4451d3f59f2a6f95e5d205c2d04ea072955d080d
clocksource/drivers/timer-atmel-pit: Properly handle error cases

The smatch utility reports a possible leak:

smatch warnings:
drivers/clocksource/timer-atmel-pit.c:183 at91sam926x_pit_dt_init() warn: possible memory leak of 'data'

Ensure data is freed before exiting with an error.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Cc: [email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
drivers/clocksource/timer-atmel-pit.c