svn commit: r239530 - head/sys/arm/at91
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Aug 21 19:55:25 UTC 2012
Author: hselasky
Date: Tue Aug 21 19:55:24 2012
New Revision: 239530
URL: http://svn.freebsd.org/changeset/base/239530
Log:
Make some at91_pcm_xxx() functions NULL safe.
Modified:
head/sys/arm/at91/at91_pmc.c
Modified: head/sys/arm/at91/at91_pmc.c
==============================================================================
--- head/sys/arm/at91/at91_pmc.c Tue Aug 21 19:45:48 2012 (r239529)
+++ head/sys/arm/at91/at91_pmc.c Tue Aug 21 19:55:24 2012 (r239530)
@@ -369,12 +369,15 @@ at91_pmc_clock_ref(const char *name)
void
at91_pmc_clock_deref(struct at91_pmc_clock *clk)
{
-
+ if (clk == NULL)
+ return;
}
void
at91_pmc_clock_enable(struct at91_pmc_clock *clk)
{
+ if (clk == NULL)
+ return;
/* XXX LOCKING? XXX */
if (clk->parent)
@@ -386,6 +389,8 @@ at91_pmc_clock_enable(struct at91_pmc_cl
void
at91_pmc_clock_disable(struct at91_pmc_clock *clk)
{
+ if (clk == NULL)
+ return;
/* XXX LOCKING? XXX */
if (--clk->refcnt == 0 && clk->set_mode)
More information about the svn-src-head
mailing list