diff options
author | 2020-11-13 14:52:28 -0800 | |
---|---|---|
committer | 2020-12-01 15:43:39 -0500 | |
commit | 857c4c0a8b2888d806f4308c58f59a6a81a1dee9 (patch) | |
tree | 6f9563e538a9e4e2033b8c3f2767d06da35ce082 /drivers/md | |
parent | dm table: Remove BUG_ON(in_interrupt()) (diff) | |
download | linux-857c4c0a8b2888d806f4308c58f59a6a81a1dee9.tar.gz linux-857c4c0a8b2888d806f4308c58f59a6a81a1dee9.tar.bz2 linux-857c4c0a8b2888d806f4308c58f59a6a81a1dee9.zip |
dm writecache: remove BUG() and fail gracefully instead
Building on arch/s390/ results in this build error:
cc1: some warnings being treated as errors
../drivers/md/dm-writecache.c: In function 'persistent_memory_claim':
../drivers/md/dm-writecache.c:323:1: error: no return statement in function returning non-void [-Werror=return-type]
Fix this by replacing the BUG() with an -EOPNOTSUPP return.
Fixes: 48debafe4f2f ("dm: add writecache target")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-writecache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index 7d277de26b3a..d5223a0e5cc5 100644 --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -319,7 +319,7 @@ err1: #else static int persistent_memory_claim(struct dm_writecache *wc) { - BUG(); + return -EOPNOTSUPP; } #endif |