Make some at91_pcm_xxx() functions NULL safe.

This commit is contained in:
Hans Petter Selasky 2012-08-21 19:55:24 +00:00
parent f9796f4373
commit 94d6bc8895

View File

@ -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_clock *clk)
void
at91_pmc_clock_disable(struct at91_pmc_clock *clk)
{
if (clk == NULL)
return;
/* XXX LOCKING? XXX */
if (--clk->refcnt == 0 && clk->set_mode)