mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 2/4] macb: handle clk_get error
@ 2011-09-09 11:46 Hubert Feurstein
  2011-09-09 11:46 ` [PATCH 3/4] atmel_mci: handle clk_get error correctly Hubert Feurstein
  2011-09-09 11:46 ` [PATCH 4/4] at91sam9g45: add missing spi clock entries Hubert Feurstein
  0 siblings, 2 replies; 9+ messages in thread
From: Hubert Feurstein @ 2011-09-09 11:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 drivers/net/macb.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 9e5ce8b..ebe3bd4 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -49,6 +49,7 @@
 #include <asm/io.h>
 #include <mach/board.h>
 #include <linux/clk.h>
+#include <linux/err.h>
 
 #include "macb.h"
 
@@ -454,6 +455,11 @@ static int macb_probe(struct device_d *dev)
 	 */
 #if defined(CONFIG_ARCH_AT91)
 	pclk = clk_get(dev, "macb_clk");
+	if (IS_ERR(pclk)) {
+		dev_err(dev, "no macb_clk\n");
+		return PTR_ERR(pclk);
+	}
+
 	clk_enable(pclk);
 	macb_hz = clk_get_rate(pclk);
 #else
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2011-09-13 19:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 11:46 [PATCH 2/4] macb: handle clk_get error Hubert Feurstein
2011-09-09 11:46 ` [PATCH 3/4] atmel_mci: handle clk_get error correctly Hubert Feurstein
2011-09-12  2:47   ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-12 10:28   ` Sascha Hauer
2011-09-09 11:46 ` [PATCH 4/4] at91sam9g45: add missing spi clock entries Hubert Feurstein
2011-09-12  2:46   ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-12 21:05     ` [PATCH] at91: add spi fake " Hubert Feurstein
2011-09-13 14:42       ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-13 19:48         ` [PATCH v2] at91: add spi clock connection id entries Hubert Feurstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox