From 5d3d4b26f585e09159d3059a7459ab43eaed39a8 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 25 Jul 2014 18:07:09 +0100 Subject: [PATCH] staging: comedi: amplc_dio200_pci: no need to test board pointer in dio200_pci_detach() `dio200_pci_detach()` doesn't need to check if the pointer to constant board data (`thisboard`) and the pointer to private per-device data (`devpriv`) are valid before calling `amplc_dio200_common_detach()`. It has no further need to check `thisboard` so remove the variable altogether. Move the test of `devpriv` to the first point it is needs to be valid. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed