mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Belisko <marek.belisko@gmail.com>
To: Greg Kroah-Hartman <gregkh@suse.de>,
	Marek Belisko <marek.belisko@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Marek Belisko <marek.belisko@gmail.com>
Subject: [PATCH 4/4] staging: ft1000: Check return value.
Date: Tue,  2 Nov 2010 14:51:47 +0100	[thread overview]
Message-ID: <1288705907-30725-4-git-send-email-marek.belisko@gmail.com> (raw)
In-Reply-To: <1288705907-30725-1-git-send-email-marek.belisko@gmail.com>

Function ft1000_submit_rx_urb() could fail so add checking
for return value.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 30a8475..1fa1f81 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -1347,6 +1347,7 @@ static int ft1000_open (struct net_device *dev)
 {
 	struct ft1000_info *pInfo = (struct ft1000_info *)netdev_priv(dev);
     struct timeval tv; //mbelian
+	int ret;
 
     DEBUG("ft1000_open is called for card %d\n", pInfo->CardNumber);
     //DEBUG("ft1000_open: dev->addr=%x, dev->addr_len=%d\n", dev->addr, dev->addr_len);
@@ -1364,8 +1365,9 @@ static int ft1000_open (struct net_device *dev)
 
     netif_carrier_on(dev); //mbelian
 
-    ft1000_submit_rx_urb(pInfo);
-    return 0;
+	ret = ft1000_submit_rx_urb(pInfo);
+
+	return ret;
 }
 
 //---------------------------------------------------------------------------
-- 
1.7.1


      parent reply	other threads:[~2010-11-02 13:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 13:51 [PATCH 1/4] staging: ft1000: Use specific error codes instead self defined Marek Belisko
2010-11-02 13:51 ` [PATCH 2/4] staging: ft1000: Use common return point Marek Belisko
2010-11-02 13:51 ` [PATCH 3/4] staging: ft1000: Correct return error values Marek Belisko
2010-11-02 13:51 ` Marek Belisko [this message]

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=1288705907-30725-4-git-send-email-marek.belisko@gmail.com \
    --to=marek.belisko@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --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®