netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
To: Andrej Krutak <andrej.krutak-uSbOeAmDUekAvxtiuMwx3w@public.gmane.org>
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: check for return value of clk_get() in mpc512x_can_get_clock()
Date: Fri, 25 Feb 2011 09:34:37 +0100	[thread overview]
Message-ID: <4D67699D.1010301@grandegger.com> (raw)
In-Reply-To: <201102231435.53991.andrej.krutak-uSbOeAmDUekAvxtiuMwx3w@public.gmane.org>

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.

      parent reply	other threads:[~2011-02-25  8:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D67699D.1010301@grandegger.com \
    --to=wg-5yr1bzd7o62+xt7jha+gda@public.gmane.org \
    --cc=andrej.krutak-uSbOeAmDUekAvxtiuMwx3w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).