]> git.baikalelectronics.ru Git - kernel.git/commit
usb: phy: msm: change devm_ioremap() to devm_ioremap_resource()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 May 2014 13:54:47 +0000 (16:54 +0300)
committerFelipe Balbi <balbi@ti.com>
Wed, 14 May 2014 14:25:51 +0000 (09:25 -0500)
commit56b1fedd99f8189e29d506d9791cdc174104f768
treeef2c9c6c16b2a01b46a082af41ec837c2a99529c
parent69f84d9b79a871c8594c57ef92e5f2ed4aae64f6
usb: phy: msm: change devm_ioremap() to devm_ioremap_resource()

There are several issues here:
1) platform_get_resource() can return NULL and that wasn't handled.
2) We should request the memory before we remap it, and
   devm_ioremap_resource() does that.
3) devm_ioremap() returns a NULL but we were checking for IS_ERR().

Fixes: 560cbfdd33c7 ('usb: phy: msm: Migrate to Managed Device Resource allocation')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-msm-usb.c