The previous maint state was saved regardless if the base driver returned an error or not. This caused strange behavior in dahdi tools. Moved the maint state save to after the switch case to reflect this. https://issues.asterisk.org/jira/browse/DAHDI-984 Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10718 a0bf4364-ded3-4de4-8d8a-66a801d63aff