From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Mon, 29 Jun 2015 06:02:50 +0000 Subject: Re: vfio: powerpc/spapr: One function call less in tce_iommu_attach_group() after kzalloc() failure Message-Id: <5590DF8A.8030503@users.sourceforge.net> List-Id: References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.so urceforge.net> <55901E68.80205@users.sourceforge.net> <55901FAC.1090109@users.sourceforge.net> <5590862A.3010603@ozlabs.ru> In-Reply-To: <5590862A.3010603@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexey Kardashevskiy , Alex Williamson , kvm@vger.kernel.org Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Michael Ellerman > 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