All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrej Krutak <andrej.krutak@sysgo.com>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: socketcan-core@lists.berlios.de, netdev@vger.kernel.org
Subject: check for return value of clk_get() in mpc512x_can_get_clock()
Date: Wed, 23 Feb 2011 14:35:53 +0100	[thread overview]
Message-ID: <201102231435.53991.andrej.krutak@sysgo.com> (raw)

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

             reply	other threads:[~2011-02-23 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 13:35 Andrej Krutak [this message]
     [not found] ` <201102231435.53991.andrej.krutak-uSbOeAmDUekAvxtiuMwx3w@public.gmane.org>
2011-02-25  8:34   ` check for return value of clk_get() in mpc512x_can_get_clock() Wolfgang Grandegger

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=201102231435.53991.andrej.krutak@sysgo.com \
    --to=andrej.krutak@sysgo.com \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan-core@lists.berlios.de \
    --cc=wg@grandegger.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.