powerpc/nvram: Fix a memory leak in err path

If kmemdup fails, We need kfree *buff* first then return -ENOMEM.
Otherwise there is a memory leak.

Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Pan Xinhui 2015-12-09 18:00:53 +08:00 • committed by Michael Ellerman
commit 0d0fecc5b5