Re: [PATCH v3] Create add_rtc() function to enable the RTC CMOS driver From: Segher Boessenkool <hidden> Date: 2007-06-20 17:47:03 + /* + * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the + * address provided by the device node matches. + */ + if (res.start != RTC_PORT(0)) { + of_node_put(np); + return -ENODEV; + } You can place the of_node_put() here and remove the previous one, and the following one. + pd = platform_device_register_simple("rtc_cmos", -1, + &res, 1); + of_node_put(np); Code looks fine, with or without that change. Segher
Keyboard shortcuts hback out one level jnext message in thread kprevious message in thread ldrill in Escclose help / fold thread tree ?toggle this help