From: Thierry Reding <thierry.reding@gmail.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: linux-pwm@vger.kernel.org, Jim Davis <jim.epost@gmail.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: atmel-hlcdc: Prevent div by zero
Date: Fri, 19 Dec 2014 09:50:43 +0100 [thread overview]
Message-ID: <20141219085041.GB7352@ulmo> (raw)
In-Reply-To: <1418933131-12270-1-git-send-email-boris.brezillon@free-electrons.com>
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
On Thu, Dec 18, 2014 at 09:05:30PM +0100, Boris Brezillon wrote:
> The slow and system clock should never return a rate of zero, but this
> might happen if the clocks property defined in the DT is referencing the
> wrong clocks.
> Prevent any division by zero from happening by testing the clk_freq value
> before calling do_div.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> drivers/pwm/pwm-atmel-hlcdc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Applied, thanks.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-12-19 8:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 16:10 randconfig build error with next-20141204, in drivers/pwm Jim Davis
2014-12-18 9:44 ` Thierry Reding
2014-12-18 9:54 ` Thierry Reding
2014-12-18 19:51 ` Boris Brezillon
2014-12-19 8:50 ` Thierry Reding
2014-12-18 20:05 ` [PATCH] pwm: atmel-hlcdc: Prevent div by zero Boris Brezillon
2014-12-19 8:50 ` Thierry Reding [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=20141219085041.GB7352@ulmo \
--to=thierry.reding@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=jim.epost@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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.