aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/mscan/mpc5xxx_can.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/mscan/mpc5xxx_can.c')
-rw-r--r--drivers/net/can/mscan/mpc5xxx_can.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index b1bdc909090f..312b9c8f4f3b 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -143,12 +143,12 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
143 np_clock = of_find_matching_node(NULL, mpc512x_clock_ids); 143 np_clock = of_find_matching_node(NULL, mpc512x_clock_ids);
144 if (!np_clock) { 144 if (!np_clock) {
145 dev_err(&ofdev->dev, "couldn't find clock node\n"); 145 dev_err(&ofdev->dev, "couldn't find clock node\n");
146 return -ENODEV; 146 return 0;
147 } 147 }
148 clockctl = of_iomap(np_clock, 0); 148 clockctl = of_iomap(np_clock, 0);
149 if (!clockctl) { 149 if (!clockctl) {
150 dev_err(&ofdev->dev, "couldn't map clock registers\n"); 150 dev_err(&ofdev->dev, "couldn't map clock registers\n");
151 return 0; 151 goto exit_put;
152 } 152 }
153 153
154 /* Determine the MSCAN device index from the physical address */ 154 /* Determine the MSCAN device index from the physical address */
@@ -233,9 +233,9 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
233 clocksrc == 1 ? "ref_clk" : "sys_clk", clockdiv); 233 clocksrc == 1 ? "ref_clk" : "sys_clk", clockdiv);
234 234
235exit_unmap: 235exit_unmap:
236 of_node_put(np_clock);
237 iounmap(clockctl); 236 iounmap(clockctl);
238 237exit_put:
238 of_node_put(np_clock);
239 return freq; 239 return freq;
240} 240}
241#else /* !CONFIG_PPC_MPC512x */ 241#else /* !CONFIG_PPC_MPC512x */