Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1255526
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/6] block: Remove unneeded variable err for returning 0 |
| Date | 2015-10-25 20:00 +0100 |
| Message-ID | <qnyGm-6x5-3@gated-at.bofh.it> (permalink) |
| References | <qnywF-6tT-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] Fix coding style issues Punit Vara <punitvara@gmail.com> - 2015-10-25 19:50 +0100
[PATCH 5/6] block: Coding style fix for comma and open , close parenthesis Punit Vara <punitvara@gmail.com> - 2015-10-25 19:50 +0100
[PATCH 6/6] block: Coding style fix for comma and open , close parenthesis Punit Vara <punitvara@gmail.com> - 2015-10-25 19:50 +0100
Re: [PATCH 6/6] block: Coding style fix for comma and open , close parenthesis punit vara <punitvara@gmail.com> - 2015-10-25 20:00 +0100
[PATCH 1/6] block: Remove unneeded variable err for returning 0 Punit Vara <punitvara@gmail.com> - 2015-10-25 20:00 +0100
Re: [PATCH 1/6] block: Remove unneeded variable err for returning 0 punit vara <punitvara@gmail.com> - 2015-10-27 20:20 +0100
[PATCH 2/6] block: drbd: Remove unnedded semicolon Punit Vara <punitvara@gmail.com> - 2015-10-25 20:00 +0100
[PATCH 3/6] block: Remove unnedded semicolon Punit Vara <punitvara@gmail.com> - 2015-10-25 20:00 +0100
[PATCH 4/6] block: Coding style fix for comma and open , close parenthesis Punit Vara <punitvara@gmail.com> - 2015-10-25 20:00 +0100
csiph-web