author | Kishon Vijay Abraham I <kishon@ti.com> | |
Wed, 9 Oct 2019 09:49:46 +0000 (15:19 +0530) | ||
committer | Sekhar Nori <nsekhar@ti.com> | |
Wed, 23 Oct 2019 13:45:32 +0000 (19:15 +0530) | ||
commit | a6ec5fac8a6c698ae3e4eebc195038ff20db8ba1 | |
tree | 41f8c3729aa023800de94409c72b6165b4f210f9 | tree | snapshot (tar.xz tar.gz zip) |
parent | c651cca227cdc0aa50dd94be0cafd02c99e31221 | commit | diff |
PCI: dwc: pci-dra7xx: Use devm_ioremap_resource() to get virtual address
devm_ioremap_resource() performs all the basic error checks which
should otherwise be done in the peripheral driver. Use
devm_ioremap_resource() instead of devm_ioremap_nocache() here.
This was reported by Klokworks
Pointer 'res' returned from call to function 'platform_get_resource_byname' at line 731 may be NULL and will be dereferenced at line 732.
* pci-dra7xx.c:731: 'res' is assigned the return value from function 'platform_get_resource_byname'.
* platform.c:193: 'platform_get_resource_byname' explicitly returns a NULL value.
* pci-dra7xx.c:732: 'res' is dereferenced by passing argument 1 to function 'resource_size'.
* ioport.h:196: 'res' is passed to function 'resource_size'.
* ioport.h:198: 'res' is explicitly dereferenced.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
devm_ioremap_resource() performs all the basic error checks which
should otherwise be done in the peripheral driver. Use
devm_ioremap_resource() instead of devm_ioremap_nocache() here.
This was reported by Klokworks
Pointer 'res' returned from call to function 'platform_get_resource_byname' at line 731 may be NULL and will be dereferenced at line 732.
* pci-dra7xx.c:731: 'res' is assigned the return value from function 'platform_get_resource_byname'.
* platform.c:193: 'platform_get_resource_byname' explicitly returns a NULL value.
* pci-dra7xx.c:732: 'res' is dereferenced by passing argument 1 to function 'resource_size'.
* ioport.h:196: 'res' is passed to function 'resource_size'.
* ioport.h:198: 'res' is explicitly dereferenced.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers/pci/controller/dwc/pci-dra7xx.c | diff | blob | history |