Serial driver calls "release" when open fails!

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Thu, 9 Dec 1999 14:18:02 +0100 (MET)


Hi,

Is this a feature?

My open routine returns error, as the port isn't available. I have
written device drivers where lots of those checks (Is the port
available) are left to the "open" routine, as you can be sure that if
the open fails, nobody can have a filedescriptor pointing at your
device. Efficiency.

I was highly surprised to see the tty_open routine call my open
routine and subsequently call my close routine. I just fixed the open
routine to handle the "nonexistant port" case, but now I have to go
and fix "close" too... Oh well.

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
 "I didn't say it was your fault. I said I was going to blame it on you."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/