* check for return value of clk_get() in mpc512x_can_get_clock()
@ 2011-02-23 13:35 Andrej Krutak
[not found] ` <201102231435.53991.andrej.krutak-uSbOeAmDUekAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Andrej Krutak @ 2011-02-23 13:35 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: socketcan-core, netdev
Hi,
just wanted to inform you - in the mpc512x_can_get_clock() function
(drivers/net/can/mscan/mpc5xxx_can.c), there are calls to clg_get(), and later
checks
if (!sys_clk) {
and
if (!ref_clk) {
but these should be
if (IS_ERR(sys_clk)) {
and
if (IS_ERR(ref_clk)) {
(otherwise you'll get an oops if something goes wrong with clg_get()).
--
Best regards | S pozdravom | Mit freundlichen Grüßen
Andrej Krutak
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: check for return value of clk_get() in mpc512x_can_get_clock()
[not found] ` <201102231435.53991.andrej.krutak-uSbOeAmDUekAvxtiuMwx3w@public.gmane.org>
@ 2011-02-25 8:34 ` Wolfgang Grandegger
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Grandegger @ 2011-02-25 8:34 UTC (permalink / raw)
To: Andrej Krutak
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA
Hi,
On 02/23/2011 02:35 PM, Andrej Krutak wrote:
> Hi,
>
> just wanted to inform you - in the mpc512x_can_get_clock() function
> (drivers/net/can/mscan/mpc5xxx_can.c), there are calls to clg_get(), and later
> checks
>
> if (!sys_clk) {
> and
> if (!ref_clk) {
>
> but these should be
>
> if (IS_ERR(sys_clk)) {
> and
> if (IS_ERR(ref_clk)) {
>
> (otherwise you'll get an oops if something goes wrong with clg_get()).
Thanks for the info. I'm going to prepare a patch.
Wolfgang.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-25 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 13:35 check for return value of clk_get() in mpc512x_can_get_clock() Andrej Krutak
[not found] ` <201102231435.53991.andrej.krutak-uSbOeAmDUekAvxtiuMwx3w@public.gmane.org>
2011-02-25 8:34 ` Wolfgang Grandegger
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).