* [PATCH 0/2] net/irda: sh_sir: Bug fix patches
@ 2010-04-06 4:42 Kuninori Morimoto
2010-04-06 4:43 ` [PATCH 1/2] net/irda: sh_sir: fixup err return value on sh_sir_open Kuninori Morimoto
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2010-04-06 4:42 UTC (permalink / raw)
To: netdev; +Cc: Samuel Ortiz, David S. Miller
Dear David
Kuninori Morimoto (2):
net/irda: sh_sir: fixup err return value on sh_sir_open
net/irda: sh_sir: Modify iounmap wrong execution
These 2 patches are bug fix of sh_sir driver.
Best regards
--
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] net/irda: sh_sir: fixup err return value on sh_sir_open
2010-04-06 4:42 [PATCH 0/2] net/irda: sh_sir: Bug fix patches Kuninori Morimoto
@ 2010-04-06 4:43 ` Kuninori Morimoto
2010-04-06 4:43 ` [PATCH 2/2] net/irda: sh_sir: Modify iounmap wrong execution Kuninori Morimoto
2010-04-07 2:52 ` [PATCH 0/2] net/irda: sh_sir: Bug fix patches David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2010-04-06 4:43 UTC (permalink / raw)
To: netdev; +Cc: Samuel Ortiz, David S. Miller
On sh_sir_open function, there was a possibility that
err variable didn't have value even though it is return value.
This patch modify it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/net/irda/sh_sir.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
index d7c983d..761ed01 100644
--- a/drivers/net/irda/sh_sir.c
+++ b/drivers/net/irda/sh_sir.c
@@ -645,8 +645,10 @@ static int sh_sir_open(struct net_device *ndev)
sh_sir_set_baudrate(self, 9600);
self->irlap = irlap_open(ndev, &self->qos, DRIVER_NAME);
- if (!self->irlap)
+ if (!self->irlap) {
+ err = -ENODEV;
goto open_err;
+ }
/*
* Now enable the interrupt then start the queue
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] net/irda: sh_sir: Modify iounmap wrong execution
2010-04-06 4:42 [PATCH 0/2] net/irda: sh_sir: Bug fix patches Kuninori Morimoto
2010-04-06 4:43 ` [PATCH 1/2] net/irda: sh_sir: fixup err return value on sh_sir_open Kuninori Morimoto
@ 2010-04-06 4:43 ` Kuninori Morimoto
2010-04-07 2:52 ` [PATCH 0/2] net/irda: sh_sir: Bug fix patches David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2010-04-06 4:43 UTC (permalink / raw)
To: netdev; +Cc: Samuel Ortiz, David S. Miller
On sh_sir_probe function, there was a possibility that
iounmap is executed even though self->membase was NULL when error case.
This patch modify it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/net/irda/sh_sir.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
index a4677b8..bdfefa0 100644
--- a/drivers/net/irda/sh_sir.c
+++ b/drivers/net/irda/sh_sir.c
@@ -720,7 +720,6 @@ static int __devinit sh_sir_probe(struct platform_device *pdev)
struct sh_sir_self *self;
struct resource *res;
char clk_name[8];
- void __iomem *base;
unsigned int irq;
int err = -ENOMEM;
@@ -735,14 +734,14 @@ static int __devinit sh_sir_probe(struct platform_device *pdev)
if (!ndev)
goto exit;
- base = ioremap_nocache(res->start, resource_size(res));
- if (!base) {
+ self = netdev_priv(ndev);
+ self->membase = ioremap_nocache(res->start, resource_size(res));
+ if (!self->membase) {
err = -ENXIO;
dev_err(&pdev->dev, "Unable to ioremap.\n");
goto err_mem_1;
}
- self = netdev_priv(ndev);
err = sh_sir_init_iobuf(self, IRDA_SKB_MAX_MTU, IRDA_SIR_MAX_FRAME);
if (err)
goto err_mem_2;
@@ -759,7 +758,6 @@ static int __devinit sh_sir_probe(struct platform_device *pdev)
ndev->netdev_ops = &sh_sir_ndo;
ndev->irq = irq;
- self->membase = base;
self->ndev = ndev;
self->qos.baud_rate.bits &= IR_9600; /* FIXME */
self->qos.min_turn_time.bits = 1; /* 10 ms or more */
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] net/irda: sh_sir: Bug fix patches
2010-04-06 4:42 [PATCH 0/2] net/irda: sh_sir: Bug fix patches Kuninori Morimoto
2010-04-06 4:43 ` [PATCH 1/2] net/irda: sh_sir: fixup err return value on sh_sir_open Kuninori Morimoto
2010-04-06 4:43 ` [PATCH 2/2] net/irda: sh_sir: Modify iounmap wrong execution Kuninori Morimoto
@ 2010-04-07 2:52 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-04-07 2:52 UTC (permalink / raw)
To: kuninori.morimoto.gx; +Cc: netdev, samuel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Tue, 06 Apr 2010 13:42:39 +0900 (JST)
>
> Dear David
>
> Kuninori Morimoto (2):
> net/irda: sh_sir: fixup err return value on sh_sir_open
> net/irda: sh_sir: Modify iounmap wrong execution
>
> These 2 patches are bug fix of sh_sir driver.
Both applied to net-next-2.6, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-07 2:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 4:42 [PATCH 0/2] net/irda: sh_sir: Bug fix patches Kuninori Morimoto
2010-04-06 4:43 ` [PATCH 1/2] net/irda: sh_sir: fixup err return value on sh_sir_open Kuninori Morimoto
2010-04-06 4:43 ` [PATCH 2/2] net/irda: sh_sir: Modify iounmap wrong execution Kuninori Morimoto
2010-04-07 2:52 ` [PATCH 0/2] net/irda: sh_sir: Bug fix patches David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).