mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-10 16:34:00 +00:00
clocksource/drivers/stm32: Fix error return code
Return an error code on failure. Problem found using Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: kernel-janitors@vger.kernel.org Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Cc: linux-arm-kernel@lists.infradead.org Link: https://lkml.kernel.org/r1528640655-18948-3-git-send-email-Julia.Lawall@lip6.fr
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),
|
to->private_data = kzalloc(sizeof(struct stm32_timer_private),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!to->private_data)
|
if (!to->private_data) {
|
||||||
|
ret = -ENOMEM;
|
||||||
goto deinit;
|
goto deinit;
|
||||||
|
}
|
||||||
|
|
||||||
rstc = of_reset_control_get(node, NULL);
|
rstc = of_reset_control_get(node, NULL);
|
||||||
if (!IS_ERR(rstc)) {
|
if (!IS_ERR(rstc)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue