Re: [PATCH] ppc64: Thermal control for SMU based machines

From: Andrew Morton
Date: Tue Oct 11 2005 - 19:04:28 EST


Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/