|
@@ -35,7 +35,7 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname)
|
|
|
{
|
|
{
|
|
|
struct device *dev = &gpu->pdev->dev;
|
|
struct device *dev = &gpu->pdev->dev;
|
|
|
const struct firmware *fw;
|
|
const struct firmware *fw;
|
|
|
- struct device_node *np;
|
|
|
|
|
|
|
+ struct device_node *np, *mem_np;
|
|
|
struct resource r;
|
|
struct resource r;
|
|
|
phys_addr_t mem_phys;
|
|
phys_addr_t mem_phys;
|
|
|
ssize_t mem_size;
|
|
ssize_t mem_size;
|
|
@@ -49,11 +49,13 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname)
|
|
|
if (!np)
|
|
if (!np)
|
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
- np = of_parse_phandle(np, "memory-region", 0);
|
|
|
|
|
- if (!np)
|
|
|
|
|
|
|
+ mem_np = of_parse_phandle(np, "memory-region", 0);
|
|
|
|
|
+ of_node_put(np);
|
|
|
|
|
+ if (!mem_np)
|
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
- ret = of_address_to_resource(np, 0, &r);
|
|
|
|
|
|
|
+ ret = of_address_to_resource(mem_np, 0, &r);
|
|
|
|
|
+ of_node_put(mem_np);
|
|
|
if (ret)
|
|
if (ret)
|
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|