Re: vfio: powerpc/spapr: One function call less in tce_iommu_attach_group() after kzalloc() failure

From: SF Markus Elfring
Date: Mon Jun 29 2015 - 02:03:39 EST


> tcegrp will be NULL and kfree() can handle this just fine

The affected function did not show this API knowledge, did it?


> (is not it the whole point of this patchset
> - remove the check and just call kfree() even if the pointer is NULL?).

Partly, yes.


> And if you wanted another label,

I suggest this to improve corresponding exception handling.


> than the existing one should have been renamed to "free_exit" or "free_unlock_exit"
> and new one would be "unlock_exit".

I chose a smaller change at this place.

I am not familiar enough with other called functions there at the moment.
Are the remaining goto statements also update candidates?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/