Browse Source

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>
Sameer Wadgaonkar 8 years ago
parent
commit
90544cb10c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/unisys/visorbus/visorchipset.c

+ 1 - 1
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;
 }