viafb: fix proc entry removal
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sat, 17 Apr 2010 19:44:56 +0000 (19:44 +0000)
committerJonathan Corbet <corbet@lwn.net>
Fri, 7 May 2010 23:17:39 +0000 (17:17 -0600)
commit2fed547c0298e1465d62b34a75a7b76353fee7d3
tree45e543683599fbb6460b458877db08e31e7a16d5
parent162fc8c0c03d5b8536f14cbd2cdfb399c50c05ec
viafb: fix proc entry removal

viafb: fix proc entry removal

Trying to remove unregistered proc entries became painful and is
useless anyway. So remove the removal of an entry that was never
registered and duplicate the logic for one which is added
conditionally. Additionally move the removal above releasing fb_info
as we still need the information.
This prevents tainting the kernel by the procfs warn on and
avoiding access to already freed memory is probably also a good idea.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/via/viafbdev.c