drivers/virt/fsl_hypervisor: Fix error handling path
First, when memory allocation for sg_list_unaligned failed, there is a bug of calling put_pages() as we haven't pinned any pages. Second, if get_user_pages_fast() failed we should unpin num_pinned pages. This will address both. As part of these changes, minor update in documentation. Fixes: 6db71994 ("drivers/virt: introduce Freescale hypervisor management driver") Signed-off-by: NSouptick Joarder <jrdr.linux@gmail.com> Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NJohn Hubbard <jhubbard@nvidia.com> Link: https://lore.kernel.org/r/1598995271-6755-1-git-send-email-jrdr.linux@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录