> > > > + if (dev) { > > > > > > Why do we need this if (dev) check? When would this not be the case? > > > > I want the variable "fixed_dwc3_globals_regs_start" to be a local variable. > > So I added an if statement. > > I can modify it to "if (dev->of_node)" which looks more make sense. > > Why? If it's within this function, it's a local variable. Don't create arbitrary > condition just to limit the scope of the variable. > > Thanks, > Thinh > I agree that don't create arbitrary conditions just to limit the scope of variables. The property "snps,global-regs-starting-offset" is in the device tree, so checking dev->of_node exists is a must. Thanks, Stanley