lint: reduce scope

Fix some lint warnings of kind
```
style (variableScope): The scope of the variable '…' can be reduced
```
OK, the code around here does not make too much sense.. `restoreIRQ` is called twice. Fix that in a separate commit?