mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 07:29:42 -05:00
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]
This commit is contained in:
parent
c60c32a577
commit
a26ed66c20
1 changed files with 3 additions and 1 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue