diff options
| author | Julia Lawall <[email protected]> | 2018-06-10 14:24:15 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2018-06-12 21:54:01 +0000 |
| commit | a26ed66c20f080c510fcf5bd448bce204f2c19d7 (patch) | |
| tree | 82b4839382598fe13bd920d742bcd83fab085227 | |
| parent | posix-cpu-timers: Remove lockdep_assert_irqs_disabled() (diff) | |
| download | kernel-a26ed66c20f080c510fcf5bd448bce204f2c19d7.tar.gz kernel-a26ed66c20f080c510fcf5bd448bce204f2c19d7.zip | |
clocksource/drivers/stm32: Fix error return code
Return an error code on failure.
Problem found using Coccinelle.
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: [email protected]
Cc: Maxime Coquelin <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/[email protected]
| -rw-r--r-- | drivers/clocksource/timer-stm32.c | 4 |
1 files changed, 3 insertions, 1 deletions
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)) { |
