From f2d0eefa770468e8cdd126ce09a251bdf804884e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 17 Mar 2018 13:56:44 +0100 Subject: [PATCH] coverity: make use of defined variable Since we declare 'r', let's use the value for something. --- lib/device/dev-io.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c index cb3a23415..1d16a660f 100644 --- a/lib/device/dev-io.c +++ b/lib/device/dev-io.c @@ -649,14 +649,10 @@ static int _aligned_io(struct device_area *where, char *write_buffer, /* ... then we write */ devbuf->write = 1; if (!(r = _io(devbuf, 0))) - goto_bad; - - _release_devbuf(devbuf); - return 1; - + stack; bad: _release_devbuf(devbuf); - return 0; + return r; } static int _dev_get_size_file(struct device *dev, uint64_t *size)