* [patch] skfp: testing the wrong variable in skfp_driver_init()
@ 2010-12-24 5:17 Dan Carpenter
2010-12-24 8:45 ` Jiri Pirko
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2010-12-24 5:17 UTC (permalink / raw)
To: netdev
Cc: Jiri Pirko, Eric Dumazet, H Hartley Sweeten, David S. Miller,
kernel-janitors
The intent here was to test if the allocation failed but we tested
"SharedMemSize" instead of "SharedMemAddr" by mistake.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index 0a66fed..16c6265 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -412,7 +412,7 @@ static int skfp_driver_init(struct net_device *dev)
bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev,
bp->SharedMemSize,
&bp->SharedMemDMA);
- if (!bp->SharedMemSize) {
+ if (!bp->SharedMemAddr) {
printk("could not allocate mem for ");
printk("hardware module: %ld byte\n",
bp->SharedMemSize);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] skfp: testing the wrong variable in skfp_driver_init()
2010-12-24 5:17 [patch] skfp: testing the wrong variable in skfp_driver_init() Dan Carpenter
@ 2010-12-24 8:45 ` Jiri Pirko
2010-12-28 21:55 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Pirko @ 2010-12-24 8:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: netdev, Eric Dumazet, H Hartley Sweeten, David S. Miller,
kernel-janitors
Fri, Dec 24, 2010 at 06:17:34AM CET, error27@gmail.com wrote:
>The intent here was to test if the allocation failed but we tested
>"SharedMemSize" instead of "SharedMemAddr" by mistake.
>
>Signed-off-by: Dan Carpenter <error27@gmail.com>
>
>diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
>index 0a66fed..16c6265 100644
>--- a/drivers/net/skfp/skfddi.c
>+++ b/drivers/net/skfp/skfddi.c
>@@ -412,7 +412,7 @@ static int skfp_driver_init(struct net_device *dev)
> bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev,
> bp->SharedMemSize,
> &bp->SharedMemDMA);
>- if (!bp->SharedMemSize) {
>+ if (!bp->SharedMemAddr) {
> printk("could not allocate mem for ");
> printk("hardware module: %ld byte\n",
> bp->SharedMemSize);
Looks obvious.
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] skfp: testing the wrong variable in skfp_driver_init()
2010-12-24 8:45 ` Jiri Pirko
@ 2010-12-28 21:55 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-12-28 21:55 UTC (permalink / raw)
To: jpirko; +Cc: error27, netdev, eric.dumazet, hsweeten, kernel-janitors
From: Jiri Pirko <jpirko@redhat.com>
Date: Fri, 24 Dec 2010 09:45:39 +0100
> Fri, Dec 24, 2010 at 06:17:34AM CET, error27@gmail.com wrote:
>>The intent here was to test if the allocation failed but we tested
>>"SharedMemSize" instead of "SharedMemAddr" by mistake.
>>
>>Signed-off-by: Dan Carpenter <error27@gmail.com>
>>
>>diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
>>index 0a66fed..16c6265 100644
>>--- a/drivers/net/skfp/skfddi.c
>>+++ b/drivers/net/skfp/skfddi.c
>>@@ -412,7 +412,7 @@ static int skfp_driver_init(struct net_device *dev)
>> bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev,
>> bp->SharedMemSize,
>> &bp->SharedMemDMA);
>>- if (!bp->SharedMemSize) {
>>+ if (!bp->SharedMemAddr) {
>> printk("could not allocate mem for ");
>> printk("hardware module: %ld byte\n",
>> bp->SharedMemSize);
>
> Looks obvious.
>
> Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-28 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-24 5:17 [patch] skfp: testing the wrong variable in skfp_driver_init() Dan Carpenter
2010-12-24 8:45 ` Jiri Pirko
2010-12-28 21:55 ` 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).