diff options
author | Eric Farman <farman@linux.ibm.com> | 2018-11-09 03:39:28 +0100 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2018-11-13 11:45:17 +0100 |
commit | 806212f91c874b24cf9eb4a9f180323671b6c5ed (patch) | |
tree | 58a95917e753376e49b0cead708fe51fa95c028a /drivers/s390 | |
parent | 55e93ecdc1ef9256279e0a0b08edf72cc47fc2f6 (diff) | |
download | linux-806212f91c874b24cf9eb4a9f180323671b6c5ed.tar.bz2 |
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: 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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/vfio_ccw_cp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c index fd77e46eb3b2..ef5ab45d94b3 100644 --- a/drivers/s390/cio/vfio_ccw_cp.c +++ b/drivers/s390/cio/vfio_ccw_cp.c @@ -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); |