misc: genwqe: Fix potential memory leak when pinning memory
authorChristian Engelmayer <cengelma@gmx.at>
Sat, 25 Jan 2014 21:47:44 +0000 (22:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 23:24:31 +0000 (15:24 -0800)
commitd913c7439add288b50752186b306634df2ae21e7
tree12d8572d310a8618f0333190a3fc8fb3f1a13ba8
parentd0f2a808b2f0fa6e115cc6f6c84bb4f29aa8af49
misc: genwqe: Fix potential memory leak when pinning memory

Fix a memory leak in the genwqe_pin_mem() error path as called by
ioctl GENWQE_PIN_MEM. In case there is an error encountered when
mapping memory, the already allocated dma_mapping struct needs to
be freed correctly.

Detected by Coverity: CID 1162606.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/genwqe/card_dev.c