From: Sameer Wadgaonkar <[email protected]>

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 <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
---
 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 25a30a4..e296df7 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;
 }
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to