[PATCH 08/32] staging: comedi: amplc_pc236: checkpatch.pl cleanup (else after return)

H Hartley Sweeten hsweeten at visionengravers.com
Wed Jul 16 17:43:19 UTC 2014


Fix these checkpatch.pl warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregk at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/amplc_pc236.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c
index c9a96ad..373739a 100644
--- a/drivers/staging/comedi/drivers/amplc_pc236.c
+++ b/drivers/staging/comedi/drivers/amplc_pc236.c
@@ -460,11 +460,11 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		if (!pci_dev)
 			return -EIO;
 		return pc236_pci_common_attach(dev, pci_dev);
-	} else {
-		dev_err(dev->class_dev, PC236_DRIVER_NAME
-			": BUG! cannot determine board type!\n");
-		return -EINVAL;
 	}
+
+	dev_err(dev->class_dev, PC236_DRIVER_NAME
+		": BUG! cannot determine board type!\n");
+	return -EINVAL;
 }
 
 /*
-- 
1.9.3



More information about the devel mailing list