Commit 94cfdec3 authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Sekhar Nori
Browse files

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: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent e2075d9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment