[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9b2b86520811170709o4581a064v957ae41403b6113@mail.gmail.com>
Date: Mon, 17 Nov 2008 15:09:21 +0000
From: "Alan Jenkins" <alan-jenkins@...fmail.co.uk>
To: "Matthew Garrett" <mjg59@...f.ucam.org>
Cc: "Corentin Chary" <corentin.chary@...il.com>, ecc@....edu,
"linux acpi" <linux-acpi@...r.kernel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [Patch 2/3] eeepc-laptop: Check return values from rfkill_register
On 11/17/08, Matthew Garrett <mjg59@...f.ucam.org> wrote:
> We should check that rfkill registration succeeds and error out if it
> doesn't. This patch also sets the default state to match the BIOS on
> load.
>
> Signed-off-by: Matthew Garrett <mjg@...hat.com>
>
> diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c
You change the usage of the "end" label so it's now only reached on
failure. How about renaming it to "fail" or "ehotk_fail"? Also, it
looks like "if (result)" is now redundant - result will always be
non-zero in the error path.
> + return 0;
>
> + bluetooth_fail:
> + if (ehotk->eeepc_bluetooth_rfkill)
> + rfkill_free(ehotk->eeepc_bluetooth_rfkill);
> + rfkill_unregister(ehotk->eeepc_wlan_rfkill);
> + ehotk->eeepc_wlan_rfkill = NULL;
> + wlan_fail:
> + if (ehotk->eeepc_wlan_rfkill)
> + rfkill_free(ehotk->eeepc_wlan_rfkill);
> end:
> if (result) {
> kfree(ehotk);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists