Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1255585 > unrolled thread
| Started by | Alexey Klimov <alexey.klimov@linaro.org> |
|---|---|
| First post | 2015-10-26 00:30 +0100 |
| Last post | 2015-10-27 11:30 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v3 1/3] clocksource: mtk_timer: add pr_fmt define Alexey Klimov <alexey.klimov@linaro.org> - 2015-10-26 00:30 +0100
[PATCH v3 3/3] clocksource: mtk_timer: fix memleak in mtk_timer_init() Alexey Klimov <alexey.klimov@linaro.org> - 2015-10-26 00:30 +0100
Re: [PATCH v3 1/3] clocksource: mtk_timer: add pr_fmt define Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-27 11:30 +0100
| From | Alexey Klimov <alexey.klimov@linaro.org> |
|---|---|
| Date | 2015-10-26 00:30 +0100 |
| Subject | [PATCH v3 1/3] clocksource: mtk_timer: add pr_fmt define |
| Message-ID | <qnCTD-LY-3@gated-at.bofh.it> |
It's a bit unclear what subsystem/driver emits some messages to dmesg in function mtk_init_timer(). Use pr_fmt to auto-prefix the messages appropriately. Acked-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> --- Changes in v3: -- none Changes in v2: -- added acked-by from Matthias drivers/clocksource/mtk_timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c index 50f0641..ca5ea9e 100644 --- a/drivers/clocksource/mtk_timer.c +++ b/drivers/clocksource/mtk_timer.c @@ -16,6 +16,8 @@ * GNU General Public License for more details. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/clk.h> #include <linux/clockchips.h> #include <linux/interrupt.h> -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Alexey Klimov <alexey.klimov@linaro.org> |
|---|---|
| Date | 2015-10-26 00:30 +0100 |
| Subject | [PATCH v3 3/3] clocksource: mtk_timer: fix memleak in mtk_timer_init() |
| Message-ID | <qnCTE-LY-5@gated-at.bofh.it> |
| In reply to | #1255585 |
Add error path to clear evt struct allocated by kzalloc()
in the beginning of function mtk_timer_init().
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
Changes in v3:
-- none
Changes in v2:
-- added acked-by from Matthias
drivers/clocksource/mtk_timer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c
index 4ddddf4..454c00e 100644
--- a/drivers/clocksource/mtk_timer.c
+++ b/drivers/clocksource/mtk_timer.c
@@ -199,7 +199,7 @@ static void __init mtk_timer_init(struct device_node *node)
evt->gpt_base = of_io_request_and_map(node, 0, "mtk-timer");
if (IS_ERR(evt->gpt_base)) {
pr_err("Can't get resource\n");
- return;
+ goto err_kzalloc;
}
evt->dev.irq = irq_of_parse_and_map(node, 0);
@@ -254,5 +254,7 @@ err_mem:
iounmap(evt->gpt_base);
of_address_to_resource(node, 0, &res);
release_mem_region(res.start, resource_size(&res));
+err_kzalloc:
+ kfree(evt);
}
CLOCKSOURCE_OF_DECLARE(mtk_mt6577, "mediatek,mt6577-timer", mtk_timer_init);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-10-27 11:30 +0100 |
| Message-ID | <qo9FT-422-1@gated-at.bofh.it> |
| In reply to | #1255585 |
On 10/26/2015 12:21 AM, Alexey Klimov wrote: > It's a bit unclear what subsystem/driver emits some messages > to dmesg in function mtk_init_timer(). > Use pr_fmt to auto-prefix the messages appropriately. > > Acked-by: Matthias Brugger <matthias.bgg@gmail.com> > Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> > --- Patches applied for next release. Thanks ! -- Daniel -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web