Re: [PATCH 1/1] staging: comedi: addi_apci_3xxx: check return value

2017-04-24 Thread Ian Abbott
On 23/04/17 10:52, Pan Bian wrote: From: Pan Bian Function pci_ioremap_bar() will return a NULL pointer if there is no enough memory. However, in function apci3xxx_auto_attach(), the return value of function pci_ioremap_bar() is not validated. This may result in NULL

Re: [PATCH 1/1] staging: comedi: addi_apci_3xxx: check return value

2017-04-24 Thread Ian Abbott
On 23/04/17 10:52, Pan Bian wrote: From: Pan Bian Function pci_ioremap_bar() will return a NULL pointer if there is no enough memory. However, in function apci3xxx_auto_attach(), the return value of function pci_ioremap_bar() is not validated. This may result in NULL dereference in following

[PATCH 1/1] staging: comedi: addi_apci_3xxx: check return value

2017-04-23 Thread Pan Bian
From: Pan Bian Function pci_ioremap_bar() will return a NULL pointer if there is no enough memory. However, in function apci3xxx_auto_attach(), the return value of function pci_ioremap_bar() is not validated. This may result in NULL dereference in following access to

[PATCH 1/1] staging: comedi: addi_apci_3xxx: check return value

2017-04-23 Thread Pan Bian
From: Pan Bian Function pci_ioremap_bar() will return a NULL pointer if there is no enough memory. However, in function apci3xxx_auto_attach(), the return value of function pci_ioremap_bar() is not validated. This may result in NULL dereference in following access to dev->mmio. This patch fixes