Commit-ID: a26ed66c20f080c510fcf5bd448bce204f2c19d7 Gitweb: https://git.kernel.org/tip/a26ed66c20f080c510fcf5bd448bce204f2c19d7 Author: Julia Lawall <Julia.Lawall@xxxxxxx> AuthorDate: Sun, 10 Jun 2018 16:24:15 +0200 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitDate: Tue, 12 Jun 2018 23:54:01 +0200 clocksource/drivers/stm32: Fix error return code Return an error code on failure. Problem found using Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@xxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> Cc: kernel-janitors@xxxxxxxxxxxxxxx Cc: Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx> Cc: Alexandre Torgue <alexandre.torgue@xxxxxx> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx Link: https://lkml.kernel.org/r1528640655-18948-3-git-send-email-Julia.Lawall@xxxxxxx --- drivers/clocksource/timer-stm32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-stm32.c b/drivers/clocksource/timer-stm32.c index e5cdc3af684c..2717f88c7904 100644 --- a/drivers/clocksource/timer-stm32.c +++ b/drivers/clocksource/timer-stm32.c @@ -304,8 +304,10 @@ static int __init stm32_timer_init(struct device_node *node) to->private_data = kzalloc(sizeof(struct stm32_timer_private), GFP_KERNEL); - if (!to->private_data) + if (!to->private_data) { + ret = -ENOMEM; goto deinit; + } rstc = of_reset_control_get(node, NULL); if (!IS_ERR(rstc)) { -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |