Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753567AbbF3Abc (ORCPT ); Mon, 29 Jun 2015 20:31:32 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33384 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752907AbbF3AbZ (ORCPT ); Mon, 29 Jun 2015 20:31:25 -0400 Subject: Re: vfio: powerpc/spapr: One function call less in tce_iommu_attach_group() after kzalloc() failure To: SF Markus Elfring , Alex Williamson , kvm@vger.kernel.org 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.sourceforge.net> <55901E68.80205@users.sourceforge.net> <55901FAC.1090109@users.sourceforge.net> <5590862A.3010603@ozlabs.ru> <5590DF8A.8030503@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Michael Ellerman From: Alexey Kardashevskiy Message-ID: <5591E355.1080708@ozlabs.ru> Date: Tue, 30 Jun 2015 10:31:17 +1000 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <5590DF8A.8030503@users.sourceforge.net> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1056 Lines: 43 On 06/29/2015 04:02 PM, SF Markus Elfring wrote: >> tcegrp will be NULL and kfree() can handle this just fine > > The affected function did not show this API knowledge, did it? but you fixed this in 1/2 :) > > >> (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'd just drop this patch. > I am not familiar enough with other called functions there at the moment. > Are the remaining goto statements also update candidates? -- Alexey -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/