]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/nvram_64: Check nvram_error_log_index in nvram_clear_error_log()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 14 Oct 2009 22:54:40 +0000 (22:54 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 30 Oct 2009 06:21:28 +0000 (17:21 +1100)
commitb1b2deca54a59bdcd2dbd16746e8c46e72d6c7ac
tree3067f9abbfeea2a41a0a183057bcf76d7ddaba3d
parent82c9b19ba554f99af22522e1fcb42c8f0a85146a
powerpc/nvram_64: Check nvram_error_log_index in nvram_clear_error_log()

nvram_clear_error_log() calls ppc_md.nvram_write() even when
nvram_error_log_index is -1 (invalid). The nvram_write() function does
not check for a negative offset.

Check nvram_error_log_index as the other nvram log functions do.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/nvram_64.c