Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1512021 > unrolled thread
| Started by | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| First post | 2016-10-30 09:30 +0100 |
| Last post | 2016-11-07 10:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] MIPS: ath79: Fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-10-30 09:30 +0100
Re: [PATCH] MIPS: ath79: Fix error handling Alban <albeu@free.fr> - 2016-11-07 10:00 +0100
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Date | 2016-10-30 09:30 +0100 |
| Subject | [PATCH] MIPS: ath79: Fix error handling |
| Message-ID | <sxTF7-2cC-7@gated-at.bofh.it> |
'clk_register_fixed_rate()' returns an error pointer in case of error, not
NULL. So test it with IS_ERR.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
arch/mips/ath79/clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c
index cc3a1e33a600..c1102cffe37d 100644
--- a/arch/mips/ath79/clock.c
+++ b/arch/mips/ath79/clock.c
@@ -45,7 +45,7 @@ static struct clk *__init ath79_add_sys_clkdev(
int err;
clk = clk_register_fixed_rate(NULL, id, NULL, 0, rate);
- if (!clk)
+ if (IS_ERR(clk))
panic("failed to allocate %s clock structure", id);
err = clk_register_clkdev(clk, id, NULL);
--
2.9.3
[toc] | [next] | [standalone]
| From | Alban <albeu@free.fr> |
|---|---|
| Date | 2016-11-07 10:00 +0100 |
| Message-ID | <sANWx-zK-9@gated-at.bofh.it> |
| In reply to | #1512021 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, 30 Oct 2016 09:25:46 +0100 Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote: > 'clk_register_fixed_rate()' returns an error pointer in case of error, not > NULL. So test it with IS_ERR. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Aban Bedel <albeu@free.fr> Alban
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web