From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [PATCH v5 3/3] watchdog: zx2967: add watchdog controller driver for ZTE's zx2967 family Date: Tue, 24 Jan 2017 18:43:21 -0800 Message-ID: <74bfcbb3-a9ce-8228-77d3-db4defa79df5@roeck-us.net> References: <1485248322-24299-1-git-send-email-baoyou.xie@linaro.org> <1485248322-24299-3-git-send-email-baoyou.xie@linaro.org> <35dcd00f-a4bd-a313-0d6f-932a3f5888f0@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Baoyou Xie Cc: Jun Nie , wim@iguana.be, Rob Herring , Mark Rutland , Mathieu Poirier , linux-arm Mailing List , linux-watchdog@vger.kernel.org, devicetree , Linux Kernel Mailing List , Shawn Guo , "xie.baoyou" , chen.chaokai@zte.com.cn, wang.qiang01@zte.com.cn List-Id: devicetree@vger.kernel.org On 01/24/2017 06:16 PM, Baoyou Xie wrote: > [ ... ] > + > + ret = of_parse_phandle_with_fixed_args(dev->of_node, > + "zte,wdt-reset-sysctrl", 3, 0, &out_args); > + if (ret) > + return; > + > + offset = out_args.args[0]; > + config = out_args.args[1]; > + mask = out_args.args[2]; > + > + regmap = syscon_node_to_regmap(out_args.np ); > + if (IS_ERR(regmap)) > + return; > + > + regmap_update_bits(regmap, offset, mask, config); > > > Another comment suggested adding > of_node_put(out_args.np ); > here. > > > is it really? most of the driver that call this function don't call of_node_put. but it seems harmless to call of_node_put. > > Even if everyone else is doing things wrong, that doesn't mean that you should do the same, nor is it a good idea to use it as argument. Guenter