mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Abdul, Hussain (H.)" <habdul@visteon.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "abbotti@mev.co.uk" <abbotti@mev.co.uk>,
	"hsweeten@visionengravers.com" <hsweeten@visionengravers.com>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/6] Staging: comedi: daqboard2000: Simplify a trivial if-return sequence
Date: Fri, 19 Jun 2015 06:00:06 +0000	[thread overview]
Message-ID: <1434693514-10621-3-git-send-email-habdul@visteon.com> (raw)
In-Reply-To: <1434693514-10621-1-git-send-email-habdul@visteon.com>

From: Abdul Hussain <habdul@visteon.com>

This patch simplify a trivial if-return sequence. Possibly combine with
a preceding function call.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
---
 drivers/staging/comedi/drivers/daqboard2000.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 611b0a3..58d8d5f 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -713,12 +713,7 @@ static int daqboard2000_auto_attach(struct comedi_device *dev,
 		return result;
 
 	s = &dev->subdevices[2];
-	result = subdev_8255_init(dev, s, daqboard2000_8255_cb,
-				  dioP2ExpansionIO8Bit);
-	if (result)
-		return result;
-
-	return 0;
+	return subdev_8255_init(dev, s, daqboard2000_8255_cb, dioP2ExpansionIO8Bit);
 }
 
 static void daqboard2000_detach(struct comedi_device *dev)
-- 
1.9.1

  parent reply	other threads:[~2015-06-19  6:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  5:59 [PATCH 1/6] Staging: comedi: dmm32at: " Abdul, Hussain (H.)
2015-06-19  6:00 ` [PATCH 2/6] Staging: comedi: fl512: " Abdul, Hussain (H.)
2015-06-19  6:00 ` Abdul, Hussain (H.) [this message]
2015-06-19 14:08   ` [PATCH 3/6] Staging: comedi: daqboard2000: " Sudip Mukherjee
2015-06-22  7:14     ` Abdul, Hussain (H.)
2015-06-19  6:00 ` [PATCH 4/6] Staging: comedi: dac02: " Abdul, Hussain (H.)
2015-06-19  6:00 ` [PATCH 5/6] Staging: comedi: ni_daq_dio24: " Abdul, Hussain (H.)
2015-06-19  6:00 ` [PATCH 6/6] Staging: comedi: s626: " Abdul, Hussain (H.)
  -- strict thread matches above, loose matches on Subject: below --
2015-06-16 14:03 [PATCH 1/6] Staging: comedi: dmm32at: " Abdul, Hussain (H.)
2015-06-16 14:03 ` [PATCH 3/6] Staging: comedi: daqboard2000: " Abdul, Hussain (H.)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434693514-10621-3-git-send-email-habdul@visteon.com \
    --to=habdul@visteon.com \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®