> On Tue, May 14, 2013 at 07:59:11PM +0400, Alexander Shiyan wrote: > > The patch improves verify_port procedure by comparing the type of > > port and IRQ numbers simultaneously. This can be important in the > > case of multiple drivers SCCNXP in the system that are different IRQs. > > So this fixes a bug? Really? Only in theory. > > Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx> > > --- > > drivers/tty/serial/sccnxp.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c > > index c773041..92e6195 100644 > > --- a/drivers/tty/serial/sccnxp.c > > +++ b/drivers/tty/serial/sccnxp.c > > @@ -713,8 +713,8 @@ static void sccnxp_config_port(struct uart_port *port, int flags) > > > > static int sccnxp_verify_port(struct uart_port *port, struct serial_struct *s) > > { > > - if ((s->type == PORT_UNKNOWN) || (s->type == PORT_SC26XX)) > > - return 0; > > + if ((s->type != PORT_UNKNOWN) && (s->type != PORT_SC26XX)) > > + return -EINVAL; > > Why are you now returning a different value? Value is not different. Patch just change logic a bit. Zero on success, same as before. --- ��.n��������+%������w��{.n�����{��ǫ����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��