Commit 806212f9 authored by Eric Farman's avatar Eric Farman Committed by Cornelia Huck
Browse files

s390/cio: Fix cleanup of pfn_array alloc failure



If pfn_array_alloc fails somehow, we need to release the pfn_array_table
that was malloc'd earlier.

Signed-off-by: default avatarEric Farman <farman@linux.ibm.com>
Message-Id: <20181109023937.96105-2-farman@linux.ibm.com>
Acked-by: default avatarHalil Pasic <pasic@linux.ibm.com>
Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 55e93ecd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -528,7 +528,7 @@ static int ccwchain_fetch_direct(struct ccwchain *chain,

	ret = pfn_array_alloc_pin(pat->pat_pa, cp->mdev, ccw->cda, ccw->count);
	if (ret < 0)
		goto out_init;
		goto out_unpin;

	/* Translate this direct ccw to a idal ccw. */
	idaws = kcalloc(ret, sizeof(*idaws), GFP_DMA | GFP_KERNEL);