RAS/CEC: Do not set decay value on error
authorBorislav Petkov <bp@suse.de>
Sat, 20 Apr 2019 19:33:08 +0000 (21:33 +0200)
committerBorislav Petkov <bp@suse.de>
Sat, 8 Jun 2019 15:34:36 +0000 (17:34 +0200)
commit5cc6b16ea1313d05956b55e83a1f753c604282a8
tree0ea40140c969393c91d33f5379306f0cd57267e6
parentde0e0624d86ff9fc512dedb297f8978698abf21a
RAS/CEC: Do not set decay value on error

When the value requested doesn't match the allowed (min,max) range,
the @data buffer should not be modified with the invalid value because
reading "decay_interval" shows it otherwise as if the previous write
succeeded.

Move the data write after the check.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
drivers/ras/cec.c