lkml.org 
[lkml]   [2016]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 10/21] ACPI-video: Return directly after a failed input_allocate_device()
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Mon, 5 Sep 2016 15:46:19 +0200

    * Return directly after a call of the function "input_allocate_device"
    failed at the beginning.

    * Delete the jump label "out" which became unnecessary with
    this refactoring.

    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    ---
    drivers/acpi/acpi_video.c | 7 ++-----
    1 file changed, 2 insertions(+), 5 deletions(-)

    diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
    index 74e5a40..6c871dd 100644
    --- a/drivers/acpi/acpi_video.c
    +++ b/drivers/acpi/acpi_video.c
    @@ -1852,10 +1852,8 @@ static int acpi_video_bus_add_notify_handler(struct acpi_video_bus *video)
    int error;

    video->input = input = input_allocate_device();
    - if (!input) {
    - error = -ENOMEM;
    - goto out;
    - }
    + if (!input)
    + return -ENOMEM;

    error = acpi_video_bus_start_devices(video);
    if (error)
    @@ -1895,7 +1893,6 @@ err_stop_dev:
    err_free_input:
    input_free_device(input);
    video->input = NULL;
    -out:
    return error;
    }

    --
    2.10.0
    \
     
     \ /
      Last update: 2016-09-17 09:58    [W:4.076 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site