]> git.baikalelectronics.ru Git - kernel.git/commit
md: don't return 0 from array_state_store
authorNeilBrown <neilb@suse.de>
Fri, 12 Jun 2015 09:46:44 +0000 (19:46 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 12 Jun 2015 10:16:16 +0000 (20:16 +1000)
commitea16722cc3d273dc817be063eb3864091e7b6c94
tree6d7eb913a79b11f8ed9beee30c81eca81e271ed2
parent0afb5eefb4ecea4b42269b2698a33a7b99f5324e
md: don't return 0 from array_state_store

Returning zero from a 'store' function is bad.
The return value should be either len length of the string
or an error.

So use 'len' if 'err' is zero.

Fixes: 11544cad3272 ("md: make reconfig_mutex optional for writes to md sysfs files.")
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@vger.kernel (v4.0+)
drivers/md/md.c