summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorbus/visorchipset.c
diff options
context:
space:
mode:
authorSameer Wadgaonkar2017-08-30 19:36:09 +0200
committerGreg Kroah-Hartman2017-08-31 18:17:38 +0200
commit90544cb10caafa6c12315215486a62a8d487f6be (patch)
treeb63c17ba48fb1d0ceb092169ff79ec30ce77094b /drivers/staging/unisys/visorbus/visorchipset.c
parentstaging: unisys: use the kernel min define (diff)
downloadkernel-qcow2-linux-90544cb10caafa6c12315215486a62a8d487f6be.tar.gz
kernel-qcow2-linux-90544cb10caafa6c12315215486a62a8d487f6be.tar.xz
kernel-qcow2-linux-90544cb10caafa6c12315215486a62a8d487f6be.zip
staging: unisys: visorbus: visorchipset.c: Fix bug in parser_init_byte_stream.
This patch fixes a bug in the function parser_init_byte_stream() by removing the call to parser_done from goto err_finish_ctx. The function parser_done() decrements chipset_dev->controlvm_payload_bytes_buffered which is not incremented before this gets called. Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorbus/visorchipset.c')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 25a30a4b46e4..e296df78c835 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1505,7 +1505,7 @@ static struct parser_context *parser_init_byte_stream(u64 addr, u32 bytes,
return ctx;
err_finish_ctx:
- parser_done(ctx);
+ kfree(ctx);
return NULL;
}