[PATCH -next] tty: of_serial: fix return value check in of_platform_serial_setup()

Alan Cox alan at linux.intel.com
Fri Nov 2 01:48:52 EST 2012


> >   				"clk or clock-frequency not
> > defined\n");
> > -			return -ENODEV;
> > +			return PTR_ERR(info->clk);
> I think this is wrong. it should return -ENODEV;

Returning the clock error at least ensures the real reason for the fail
is reported. I think its better to use the PTR_ERR but I'd not class
either as wrong.

Alan


More information about the devicetree-discuss mailing list