From: Bartosz Golaszewski Date: Tue, 9 Jan 2018 23:55:53 +0000 (+0100) Subject: core: remove an unnecessary else X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=23d3906810ef34c9429b0d58a5a500a1e9d6a022;p=qemu-gpiodev%2Flibgpiod.git core: remove an unnecessary else This else is not useful as all other if (else)'s in this block return. Signed-off-by: Bartosz Golaszewski --- diff --git a/src/lib/core.c b/src/lib/core.c index 1279ec1..935e163 100644 --- a/src/lib/core.c +++ b/src/lib/core.c @@ -492,10 +492,10 @@ int gpiod_line_request_bulk(struct gpiod_line_bulk *bulk, return line_request_values(bulk, config, default_vals); } else if (line_request_is_events(config->request_type)) { return line_request_events(bulk, config); - } else { - errno = EINVAL; - return -1; } + + errno = EINVAL; + return -1; } void gpiod_line_release(struct gpiod_line *line)