lkml.org 
[lkml]   [2009]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] Add rfkill support to compal-laptop
From
Date
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]
\
 
 \ /
  Last update: 2009-08-19 19:17    [W:0.089 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site