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

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


Fix the checkpatch.pl warning:

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/pcl724.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcl724.c b/drivers/staging/comedi/drivers/pcl724.c
index 655bac4..c7f8eb1 100644
--- a/drivers/staging/comedi/drivers/pcl724.c
+++ b/drivers/staging/comedi/drivers/pcl724.c
@@ -88,14 +88,12 @@ static int pcl724_8255mapped_io(int dir, int port, int data,
 
 	iobase &= 0x0fff;
 
+	outb(port + movport, iobase);
 	if (dir) {
-		outb(port + movport, iobase);
 		outb(data, iobase + 1);
 		return 0;
-	} else {
-		outb(port + movport, iobase);
-		return inb(iobase + 1);
 	}
+	return inb(iobase + 1);
 }
 
 static int pcl724_attach(struct comedi_device *dev,
-- 
1.9.3



More information about the devel mailing list