s390/cio: Fix cleanup of pfn_array alloc failure
Subsystems (3)
From: Eric Farman <[email protected]>
If pfn_array_alloc fails somehow, we need to release the pfn_array_table that was malloc'd earlier.
Signed-off-by Eric Farman <[email protected]>
Message-Id: <[email protected]>
Acked-by Halil Pasic <[email protected]>
Signed-off-by Cornelia Huck <[email protected]>
--- drivers/s390/cio/vfio_ccw_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/cio/vfio_ccw_cp.c +1 -1
@@ -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 );
Signature · 1 line
2.17.2