On Mon, 2017-04-03 at 17:31 +0300, Andy Shevchenko wrote: > On Mon, 2017-04-03 at 16:27 +0200, Philipp Zabel wrote: > >
> > > int rstc_id; > > > int ret; > > > > > > - if (!node) > > > - return ERR_PTR(-EINVAL); > > > - > > > > This should be > > > > if (!node) > > return optional ? NULL : ERR_PTR(-EINVAL); > > > > instead. Can you confirm this works for Intel boards with DW UART? I > > can > > fix it up when applying if you agree. > > I don't think it worth to change. I specifically checked all of_* > calls > in that function and they cope pretty nice with node == NULL. > > So, I rather to go with my initial change. > Hit Enter before closing another thought. When you come with solution where this __of_reset_control_get() will be called only for node != NULL case you will not need that check either. So, I would go my solution because of two benefits: - it fixes bug - if will not bring ping-ponging code > Thanks for review! > -- Andy Shevchenko <[email protected]> Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

