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


Groups > linux.kernel > #1664282 > unrolled thread

Re: [PATCH v9 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging

Started byThomas Gleixner <tglx@linutronix.de>
First post2017-06-13 00:50 +0200
Last post2017-06-13 00:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v9 07/10] powerpc/perf: PMU functions for Core IMC and  hotplugging Thomas Gleixner <tglx@linutronix.de> - 2017-06-13 00:50 +0200

#1664282 — Re: [PATCH v9 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging

FromThomas Gleixner <tglx@linutronix.de>
Date2017-06-13 00:50 +0200
SubjectRe: [PATCH v9 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging
Message-ID<tRGjM-8du-9@gated-at.bofh.it>
On Wed, 7 Jun 2017, Anju T Sudhakar wrote:
> On Tuesday 06 June 2017 03:39 PM, Thomas Gleixner wrote:
> > On Mon, 5 Jun 2017, Anju T Sudhakar wrote:
> > > +static void cleanup_all_core_imc_memory(struct imc_pmu *pmu_ptr)
> > > +{
> > > +	struct imc_mem_info *ptr = pmu_ptr->mem_info;
> > > +
> > > +	if (!ptr)
> > > +		return;
> > That's pointless.
> 
> No, it is not.  We may end up here from imc_mem_init() when the memory
> allocation for pmu_ptr->mem_info fails. So in that case we can just
> return from here, and kfree wont be called with a NULL pointer.

What's the problem with that. kfree() CAN be called with a NULL pointer. It
has a check already.

Thanks,

	tglx

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web