]> www.infradead.org Git - users/dwmw2/linux.git/commit
clocksource/drivers/timer-atmel-pit: Properly handle error cases
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 25 Apr 2018 10:14:39 +0000 (12:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Oct 2018 07:33:10 +0000 (09:33 +0200)
commit771df4eea40241fac5ef5a8332e5353273255ff5
treee916462e79d34a92e0685c8e296ab602ab2862cf
parent45a156123ce492d577a51a6731b2f1e3445d7c4b
clocksource/drivers/timer-atmel-pit: Properly handle error cases

commit 52bf4a900d9cede3eb14982d0f2c5e6db6d97cc3 upstream.

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 <dan.carpenter@oracle.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clocksource/timer-atmel-pit.c