summaryrefslogtreecommitdiff
path: root/drivers/md/dm-writecache.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2020-11-14 01:52:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-11 15:23:33 +0300
commitb9df537e5fcd7df6cae6ffa3906657c71e79b71f (patch)
tree2277c79b82f3d5258c9fed3b861d3702eb7cc669 /drivers/md/dm-writecache.c
parent8e2c50315f00b3733e71968abda13bbba8971afd (diff)
downloadlinux-b9df537e5fcd7df6cae6ffa3906657c71e79b71f.tar.xz
dm writecache: remove BUG() and fail gracefully instead
commit 857c4c0a8b2888d806f4308c58f59a6a81a1dee9 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md/dm-writecache.c')
-rw-r--r--drivers/md/dm-writecache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index 27ec6c537d95..08ae59a6e873 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -316,7 +316,7 @@ err1:
#else
static int persistent_memory_claim(struct dm_writecache *wc)
{
- BUG();
+ return -EOPNOTSUPP;
}
#endif