From: Punit Vara <punitvara@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: drbd-user@lists.linbit.com, drbd-dev@lists.linbit.com,
Punit Vara <punitvara@gmail.com>
Subject: [PATCH 1/6] block: Remove unneeded variable err for returning 0
Date: Mon, 26 Oct 2015 00:18:32 +0530 [thread overview]
Message-ID: <1445798917-18876-2-git-send-email-punitvara@gmail.com> (raw)
In-Reply-To: <1445798917-18876-1-git-send-email-punitvara@gmail.com>
This patch is to the mg_disk.c file that removes unnecessary err
and fixes following warning reported by coccicheck:
Unneeded variable: "err". Return "0" on line 1077
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/block/mg_disk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index 145ce2a..d6f3feb 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -1038,7 +1038,6 @@ static int mg_remove(struct platform_device *plat_dev)
{
struct mg_drv_data *prv_data = plat_dev->dev.platform_data;
struct mg_host *host = prv_data->host;
- int err = 0;
/* delete timer */
del_timer_sync(&host->timer);
@@ -1074,7 +1073,7 @@ static int mg_remove(struct platform_device *plat_dev)
/* free mg_host */
kfree(host);
- return err;
+ return 0;
}
static struct platform_driver mg_disk_driver = {
--
2.5.3
next prev parent reply other threads:[~2015-10-25 18:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-25 18:48 [PATCH 0/6] Fix coding style issues Punit Vara
2015-10-25 18:48 ` Punit Vara [this message]
2015-10-27 19:11 ` [PATCH 1/6] block: Remove unneeded variable err for returning 0 punit vara
2015-10-25 18:48 ` [PATCH 2/6] block: drbd: Remove unnedded semicolon Punit Vara
2015-10-25 18:48 ` [PATCH 3/6] block: " Punit Vara
2015-10-25 18:48 ` [PATCH 4/6] block: Coding style fix for comma and open , close parenthesis Punit Vara
2015-10-25 18:48 ` [PATCH 5/6] " Punit Vara
2015-10-25 18:48 ` [PATCH 6/6] " Punit Vara
2015-10-25 18:55 ` punit vara
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=1445798917-18876-2-git-send-email-punitvara@gmail.com \
--to=punitvara@gmail.com \
--cc=drbd-dev@lists.linbit.com \
--cc=drbd-user@lists.linbit.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
Powered by JetHome