linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Mathias Kresin <dev@kresin.me>
Cc: sgruszka@redhat.com, helmut.schaa@googlemail.com,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rt2x00: call clk_get_rate only if we have a clock
Date: Tue, 25 Jul 2017 15:44:02 +0300	[thread overview]
Message-ID: <87r2x4it4d.fsf@codeaurora.org> (raw)
In-Reply-To: <1499498863-6865-1-git-send-email-dev@kresin.me> (Mathias Kresin's message of "Sat, 8 Jul 2017 09:27:43 +0200")

Mathias Kresin <dev@kresin.me> writes:

> If clk_get returns an error, rt2x00dev->clk is set to NULL. In
> contrast to the common clock framework provided clk_get_rate(), at
> least the ramips and bcm63xx legacy implementation of the clk API
> access the rate member of the clk struct without a NULL check. This
> results into a kernel panic if we do not have a (SoC) clock.
>
> Call clk_get_rate only if we have a clock to fix the issues. This
> approach is similar to what is done in the kernel at various places.
> Usually clk_get_rate() is only called if clk_get_rate() doesn't return
> an error.
>
> Signed-off-by: Mathias Kresin <dev@kresin.me>
> ---
>
> Resend, the first mail had the wrong list in cc.

Then you should mark this as v2:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing

-- 
Kalle Valo

      parent reply	other threads:[~2017-07-25 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08  7:27 [PATCH] rt2x00: call clk_get_rate only if we have a clock Mathias Kresin
2017-07-08 11:15 ` Jonas Gorski
2017-07-08 13:37   ` Mathias Kresin
2017-07-10  6:52     ` Stanislaw Gruszka
2017-07-25 12:44 ` Kalle Valo [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=87r2x4it4d.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=dev@kresin.me \
    --cc=helmut.schaa@googlemail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.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 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).