diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-03-18 16:16:33 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-04-11 19:01:01 +0300 |
commit | b362c733ed7bf312ed729847bc26ba89febc556e (patch) | |
tree | 3aca88e86af3babc68dbdc97eaf13fad0e569efe /drivers/md/dm-writecache.c | |
parent | 6b79a428c02769f2a11f8ae76bf866226d134887 (diff) | |
download | linux-b362c733ed7bf312ed729847bc26ba89febc556e.tar.xz |
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-writecache.c')
-rw-r--r-- | drivers/md/dm-writecache.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index 3aa5874f0aef..81b60b75a9fa 100644 --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -2776,15 +2776,7 @@ static struct target_type writecache_target = { static int __init dm_writecache_init(void) { - int r; - - r = dm_register_target(&writecache_target); - if (r < 0) { - DMERR("register failed %d", r); - return r; - } - - return 0; + return dm_register_target(&writecache_target); } static void __exit dm_writecache_exit(void) |