Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508612

Re: [PATCH 3/3] clk: keystone: Fix missing iounmap calls in an error handling path

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] clk: keystone: Fix missing iounmap calls in an error handling path
Date 2016-10-25 22:40 +0200
Message-ID <swgFP-25Y-7@gated-at.bofh.it> (permalink)
References <svUlY-4eX-5@gated-at.bofh.it> <svUlX-4eX-3@gated-at.bofh.it> <sw41X-2lL-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10/25, walter harms wrote:
> Am 24.10.2016 22:43, schrieb Christophe JAILLET:
> > @@ -220,6 +218,12 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl)
> >  
> >  out:
> >  	pr_err("%s: error initializing pll %s\n", __func__, node->name);
> > +	if (pll_data->pllm)
> > +		iounmap(pll_data->pllm);
> > +	if (pll_data->pll_ctl0)
> > +		iounmap(pll_data->pll_ctl0);
> > +	if (pll_data->pllod)
> > +		iounmap(pll_data->pllod);
> >  	kfree(pll_data);
> >  }
> >  
> 
> IMHO calles the iounmap() need no check for NULL.
> 

ARM doesn't seem to check for NULL there though. So that would be
a bug.

It would be nice to remove the checks though. Perhaps someone
could do that by unifying ionumap into asm-generic with the NULL
check and then have architecture specific functions for the rest
of it?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 3/3] clk: keystone: Fix missing iounmap calls in an error handling path Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-10-24 22:50 +0200
  Re: [PATCH 3/3] clk: keystone: Fix missing iounmap calls in an error  handling path walter harms <wharms@bfs.de> - 2016-10-25 09:10 +0200
    Re: [PATCH 3/3] clk: keystone: Fix missing iounmap calls in an error  handling path Stephen Boyd <sboyd@codeaurora.org> - 2016-10-25 22:40 +0200

csiph-web