From 90544cb10caafa6c12315215486a62a8d487f6be Mon Sep 17 00:00:00 2001 From: Sameer Wadgaonkar Date: Wed, 30 Aug 2017 13:36:09 -0400 Subject: [PATCH] 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 Reported-by: Dan Carpenter Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5