]> git.baikalelectronics.ru Git - kernel.git/commit
md: Fix compilation warning
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 16 Jul 2020 04:54:40 +0000 (13:54 +0900)
committerSong Liu <songliubraving@fb.com>
Thu, 16 Jul 2020 05:46:07 +0000 (22:46 -0700)
commit5955f8baca662f71a4a7e252bc0440dbb312125f
treef048c8bdfcba8d8219307879bdf6d25e8b985b30
parent5217ff4b21af3482ef299a14781655eb6f45ba1b
md: Fix compilation warning

Remove the if statement around the calls to sysfs_link_rdev() to avoid
the compilation warnings:

warning: suggest braces around empty body in an ‘if’ statement

when compiling with W=1. For the call to sysfs_create_link() generating
the same warning, use the err variable to store the function result,
avoiding triggering another warning as the function is declared
as 'warn_unused_result'.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/md.c