|
@@ -387,8 +387,10 @@ static int ccwchain_calc_length(u64 iova, struct channel_program *cp)
|
|
|
* orb specified one of the unsupported formats, we defer
|
|
|
* checking for IDAWs in unsupported formats to here.
|
|
|
*/
|
|
|
- if ((!cp->orb.cmd.c64 || cp->orb.cmd.i2k) && ccw_is_idal(ccw))
|
|
|
+ if ((!cp->orb.cmd.c64 || cp->orb.cmd.i2k) && ccw_is_idal(ccw)) {
|
|
|
+ kfree(p);
|
|
|
return -EOPNOTSUPP;
|
|
|
+ }
|
|
|
|
|
|
if ((!ccw_is_chain(ccw)) && (!ccw_is_tic(ccw)))
|
|
|
break;
|
|
@@ -528,7 +530,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);
|