summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bufio.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2015-11-24 01:11:32 +0100
committerMike Snitzer <snitzer@redhat.com>2015-12-10 16:38:57 +0100
commitf98c8f797021e78ba27143ecd39c51995c47aa8b (patch)
tree790bba6c2e7acae814300fe5cae09fa01e3d9080 /drivers/md/dm-bufio.c
parentdm block manager: cleanup code that prints stacktrace (diff)
downloadlinux-f98c8f797021e78ba27143ecd39c51995c47aa8b.tar.xz
linux-f98c8f797021e78ba27143ecd39c51995c47aa8b.zip
dm bufio: return NULL to improve code clarity
A small code cleanup in new_read() - return NULL instead of b (although b is NULL at this point). This function is not returning pointer to the buffer, it is returning a pointer to the bufffer's data, thus it makes no sense to return the variable b. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-bufio.c')
-rw-r--r--drivers/md/dm-bufio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index 2dd33085b331..7734298bff3c 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -1068,7 +1068,7 @@ static void *new_read(struct dm_bufio_client *c, sector_t block,
__flush_write_list(&write_list);
if (!b)
- return b;
+ return NULL;
if (need_submit)
submit_io(b, READ, b->block, read_endio);