瀏覽代碼

memory: omap-gpmc: Avoid redundant NULL check

child->name cannot be NULL as we're already checking for it
in gpmc_probe_dt_children()

Signed-off-by: Roger Quadros <rogerq@ti.com>
Roger Quadros 7 年之前
父節點
當前提交
d507178f2e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/memory/omap-gpmc.c

+ 2 - 2
drivers/memory/omap-gpmc.c

@@ -2060,8 +2060,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
 	 * timings.
 	 */
 	name = gpmc_cs_get_name(cs);
-	if (name && child->name && of_node_cmp(child->name, name) == 0)
-			goto no_timings;
+	if (name && of_node_cmp(child->name, name) == 0)
+		goto no_timings;
 
 	ret = gpmc_cs_request(cs, resource_size(&res), &base);
 	if (ret < 0) {