From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id AE6A61A0163 for ; Mon, 31 Aug 2015 07:20:43 +1000 (AEST) In-Reply-To: <1440669019-23800-1-git-send-email-imunsie@au.ibm.com> To: Ian Munsie From: Michael Ellerman Cc: Matt Ochs , linuxppc-dev , mikey , linux-kernel , Ian Munsie Subject: Re: [1/2] cxl: Fix + cleanup error paths in cxl_dev_context_init Message-Id: <20150830212043.80FFA14016A@ozlabs.org> Date: Mon, 31 Aug 2015 07:20:43 +1000 (AEST) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2015-27-08 at 09:50:18 UTC, Ian Munsie wrote: > From: Ian Munsie > > If the cxl_context_alloc() call fails, we return immediately without > releasing the reference on the AFU device, allowing it to leak. > > This patch switches to using goto style error handling so that the > device is released in common code for both error paths, and will also > simplify things if we add additional initialisation in this function in > the future. > > Signed-off-by: Ian Munsie Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/af2a50bb0ce1ca7a9c478481 cheers