Really, the of_node_put() is connected to the loop and not the function so the original code is the right way to do it. Otherwise if we added more error handling to the function then normal kernel error handling wouldn't work naturally. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html