mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
s390/cio: Fix cleanup of pfn_array alloc failure
[ Upstream commit 806212f91c ]
If pfn_array_alloc fails somehow, we need to release the pfn_array_table
that was malloc'd earlier.
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20181109023937.96105-2-farman@linux.ibm.com>
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
00bac44c99
commit
a4f21114d8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user