lkml.org 
[lkml]   [2011]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rtc-linux] [PATCH] tile: add an RTC driver for the Tilera hypervisor
On Wed, 4 May 2011 15:52:21 -0400
Chris Metcalf <cmetcalf@tilera.com> wrote:

> This is a simple RTC driver that lets Tilera hardware boot up and
> set the clock correctly.
>
>
> ...
>
> +static int __init tile_rtc_driver_init(void)
> +{
> + int err;
> +
> + err = platform_driver_register(&tile_rtc_platform_driver);
> + if (err)
> + return err;
> +
> + tile_rtc_platform_device = platform_device_alloc("rtc-tile", 0);
> + if (tile_rtc_platform_device == NULL) {
> + platform_driver_unregister(&tile_rtc_platform_driver);
> + return -ENOMEM;
> + }
> +
> + err = platform_device_add(tile_rtc_platform_device);
> + if (err) {
> + platform_device_put(tile_rtc_platform_device);

should we have a platform_driver_unregister() here?

> + return err;
> + }
> +
> + return 0;
> +}
>
> ...
>


\
 
 \ /
  Last update: 2011-05-12 00:47    [W:0.037 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site