Messages in this thread | | | Subject | Re: [PATCH 2/3] Add rfkill support to compal-laptop | From | Johannes Berg <> | Date | Wed, 19 Aug 2009 19:13:32 +0200 |
| |
Hi Mario,
First, let me say I agree with Alan, the option 1 is more desirable if possible to do with the hardware. But this looks ok from an rfkill POV now, except there's a small bug:
> + ret = setup_rfkill(); > + if (ret) > + printk(KERN_WARNING "compal-laptop: Unable to setup > rfkill\n");
That doesn't error out, so
> + rfkill_unregister(wifi_rfkill); > + rfkill_destroy(wifi_rfkill); > + rfkill_unregister(bt_rfkill); > + rfkill_destroy(bt_rfkill);
this will crash without NULL checks.
(and you have to explicitly assign NULL in setup_rfkill() too, when bluetooth fails and wifi is freed)
johannes [unhandled content-type:application/pgp-signature] | |