From: Rupesh Gujare <rupesh.gujare@atmel.com>
To: <devel@linuxdriverproject.org>
Cc: <sergei.shtylyov@cogentembedded.com>, <dan.carpenter@oracle.com>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<gregkh@linuxfoundation.org>
Subject: [PATCH 2/3] staging: ozwpan: Fix wrong error check.
Date: Fri, 23 Aug 2013 16:11:01 +0100 [thread overview]
Message-ID: <1377270662-10379-2-git-send-email-rupesh.gujare@atmel.com> (raw)
In-Reply-To: <1377270662-10379-1-git-send-email-rupesh.gujare@atmel.com>
schedule_work() returns true if succeeded & false on failure,
error check was doing exactly reverse.
Also removes extra variable.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
---
drivers/staging/ozwpan/ozpd.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c
index 5d24af3..d39a3df 100644
--- a/drivers/staging/ozwpan/ozpd.c
+++ b/drivers/staging/ozwpan/ozpd.c
@@ -261,17 +261,13 @@ void oz_pd_free(struct work_struct *work)
*/
void oz_pd_destroy(struct oz_pd *pd)
{
- int ret;
-
if (hrtimer_active(&pd->timeout))
hrtimer_cancel(&pd->timeout);
if (hrtimer_active(&pd->heartbeat))
hrtimer_cancel(&pd->heartbeat);
INIT_WORK(&pd->workitem, oz_pd_free);
- ret = schedule_work(&pd->workitem);
-
- if (ret)
+ if (!schedule_work(&pd->workitem))
oz_pd_dbg(pd, ON, "failed to schedule workitem\n");
}
--
1.7.9.5
next prev parent reply other threads:[~2013-08-23 15:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 15:11 [PATCH 1/3] staging: ozwpan: Remove memset Rupesh Gujare
2013-08-23 15:11 ` Rupesh Gujare [this message]
2013-08-23 15:11 ` [PATCH 3/3] staging: ozwpan: Fix Documentation style Rupesh Gujare
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=1377270662-10379-2-git-send-email-rupesh.gujare@atmel.com \
--to=rupesh.gujare@atmel.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/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®