linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: ath79: Fix error handling
@ 2016-10-30  8:25 Christophe JAILLET
  2016-11-07  8:53 ` Alban
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-10-30  8:25 UTC (permalink / raw)
  To: ralf, antonynpavlov, albeu, hackpascal, amitoj1606
  Cc: linux-mips, linux-kernel, kernel-janitors, Christophe JAILLET

'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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: ath79: Fix error handling
  2016-10-30  8:25 [PATCH] MIPS: ath79: Fix error handling Christophe JAILLET
@ 2016-11-07  8:53 ` Alban
  0 siblings, 0 replies; 2+ messages in thread
From: Alban @ 2016-11-07  8:53 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Alban, ralf, antonynpavlov, hackpascal, amitoj1606, linux-mips,
	linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-07  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-30  8:25 [PATCH] MIPS: ath79: Fix error handling Christophe JAILLET
2016-11-07  8:53 ` Alban

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).