]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
fpga: dfl: afu: Corrected error handling levels
authorSouptick Joarder <jrdr.linux@gmail.com>
Mon, 18 May 2020 18:19:51 +0000 (23:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 May 2020 14:46:37 +0000 (16:46 +0200)
commitc9d7e3da1f3c4cf5dddfc5d7ce4d76d013aba1cc
treed7450eca4ea6ef04656da4921562070a1d2626cc
parentb03025c57396b23fe2423384c25aa580000e9883
fpga: dfl: afu: Corrected error handling levels

Corrected error handling goto sequnece. Level put_pages should
be called when pinned pages >= 0 && pinned != npages. Level
free_pages should be called when pinned pages < 0.

Fixes: fa8dda1edef9 ("fpga: dfl: afu: add DFL_FPGA_PORT_DMA_MAP/UNMAP ioctls support")
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Acked-by: Wu Hao <hao.wu@intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/1589825991-3545-1-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/dfl-afu-dma-region.c