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)
commit5e3b8a8d59b2064f68ab349182f5dc5f5bb4fd30
treef048c8bdfcba8d8219307879bdf6d25e8b985b30
parent659bf827ba8f1183b714341d8a1d4b1e446178d9
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