lkml.org 
[lkml]   [2005]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ppc64: Thermal control for SMU based machines
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> +int wf_register_client(struct notifier_block *nb)
> +{
> + int rc;
> + struct wf_control *ct;
> + struct wf_sensor *sr;
> +
> + down(&wf_lock);
> + rc = notifier_chain_register(&wf_client_list, nb);
> + if (rc != 0)
> + goto bail;
> + wf_client_count++;
> + list_for_each_entry(ct, &wf_controls, link)
> + wf_notify(WF_EVENT_NEW_CONTROL, ct);
> + list_for_each_entry(sr, &wf_sensors, link)
> + wf_notify(WF_EVENT_NEW_SENSOR, sr);
> + if (wf_client_count == 1)
> + wf_start_thread();
> + up(&wf_lock);
> + bail:
> + return rc;
> +}

This will leave wf_lock held on error.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-12 02:06    [W:0.033 / U:1.664 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site