staging: altera-stapl: Fix memory leak of altera_init()
In case kzalloc() fails the second or third time
we should free the previous allocated resources.
In order to keep one return point and to keep the cleanup code to one
place, some reordering was necessary.
Also while at it, removed the *sizeof(char) - to quote Linus:
"" Also removed the silly "* sizeof(u8)". If that isn't 1, we have way
deeper problems than a simple multiplication can fix. """
Reported-by: Andre Bartke <andre.bartke@gmail.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>