diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-03-18 21:16:33 +0800 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-04-11 12:01:01 -0400 |
commit | b362c733ed7bf312ed729847bc26ba89febc556e (patch) | |
tree | 3aca88e86af3babc68dbdc97eaf13fad0e569efe /drivers/md/dm-zero.c | |
parent | 6b79a428c02769f2a11f8ae76bf866226d134887 (diff) | |
download | linux-stable-b362c733ed7bf312ed729847bc26ba89febc556e.tar.gz linux-stable-b362c733ed7bf312ed729847bc26ba89febc556e.tar.bz2 linux-stable-b362c733ed7bf312ed729847bc26ba89febc556e.zip |
dm: push error reporting down to dm_register_target()
Simplifies each DM target's init method by making dm_register_target()
responsible for its error reporting (on behalf of targets).
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-zero.c')
-rw-r--r-- | drivers/md/dm-zero.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/md/dm-zero.c b/drivers/md/dm-zero.c index 6215d8eb7e41..884ac726a743 100644 --- a/drivers/md/dm-zero.c +++ b/drivers/md/dm-zero.c @@ -78,12 +78,7 @@ static struct target_type zero_target = { static int __init dm_zero_init(void) { - int r = dm_register_target(&zero_target); - - if (r < 0) - DMERR("register failed %d", r); - - return r; + return dm_register_target(&zero_target); } static void __exit dm_zero_exit(void) |