ucc_geth: Fix IRQ freeing code in ucc_geth_open()
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Thu, 18 Dec 2008 08:23:29 +0000 (08:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Dec 2008 06:50:50 +0000 (22:50 -0800)
commit67c2fb8ff0eda3cee95954a1dd245c3ce1a10486
treee25dc49e42338225f25bb999aff0bebae8cb78a9
parent1762a29ae5ebdd974eb2ba0c36b56ab6f7a9c16d
ucc_geth: Fix IRQ freeing code in ucc_geth_open()

open() routine calls stop() in case of errors, the function will try
to free the requested IRQ. But we don't know if it was actually
requested, so the code might issue bogus free_irq(0, dev) call.

Fix this by rearranging the code so that now request_irq() is the last
call in the open() routine, and move free_irq() into the close().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ucc_geth.c