powerpc/powernv: Handle unknown OPAL errors in opal_nvram_write()
authorNicholas Piggin <npiggin@gmail.com>
Mon, 26 Mar 2018 15:02:33 +0000 (01:02 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 30 Mar 2018 13:10:32 +0000 (00:10 +1100)
commit741de617661794246f84a21a02fc5e327bffc9ad
treeb85a6830c1722c33d3c8b2db55a4ccc0f3b2308f
parent0f9bdfe3c77091e8704d2e510eb7c2c2c6cde524
powerpc/powernv: Handle unknown OPAL errors in opal_nvram_write()

opal_nvram_write currently just assumes success if it encounters an
error other than OPAL_BUSY or OPAL_BUSY_EVENT. Have it return -EIO
on other errors instead.

Fixes: 628daa8d5abf ("powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks")
Cc: stable@vger.kernel.org # v3.2+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal-nvram.c