2005-11-26 23:37:09

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] drivers/message/i2o/pci.c: fix a NULL pointer dereference

The Coverity checker spotted this obvious NULL pointer dereference.


Signed-off-by: Adrian Bunk <[email protected]>

---

This patch was already sent on:
- 23 Nov 2005
- 21 Nov 2005

--- linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c.old 2005-11-20 21:50:45.000000000 +0100
+++ linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c 2005-11-20 21:51:08.000000000 +0100
@@ -421,8 +421,8 @@
i2o_pci_free(c);

free_controller:
- i2o_iop_free(c);
put_device(c->device.parent);
+ i2o_iop_free(c);

disable:
pci_disable_device(pdev);


2005-11-27 16:32:41

by Markus Lidel

[permalink] [raw]
Subject: Re: [2.6 patch] drivers/message/i2o/pci.c: fix a NULL pointer dereference

Hello,

Adrian Bunk wrote:
> The Coverity checker spotted this obvious NULL pointer dereference.
> Signed-off-by: Adrian Bunk <[email protected]>

Signed-off-by: Markus Lidel <[email protected]

> This patch was already sent on:
> - 23 Nov 2005
> - 21 Nov 2005

Sorry, didn't know i have to answer to it. Next time i will respond earlier.

Thank you very much for this patch!

> --- linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c.old 2005-11-20 21:50:45.000000000 +0100
> +++ linux-2.6.15-rc1-mm2-full/drivers/message/i2o/pci.c 2005-11-20 21:51:08.000000000 +0100
> @@ -421,8 +421,8 @@
> i2o_pci_free(c);
>
> free_controller:
> - i2o_iop_free(c);
> put_device(c->device.parent);
> + i2o_iop_free(c);
>
> disable:
> pci_disable_device(pdev);