counter: microchip-tcb-capture: check the correct variable
This should be testing "regmap" instead of "priv->regmap". The
"priv->regmap" variable is always zero so it's not an error pointer.
Fixes: 106b104137
("counter: Add microchip TCB capture counter")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Родитель
336306790b
Коммит
ab3300deff
|
@ -320,8 +320,8 @@ static int mchp_tc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
regmap = syscon_node_to_regmap(np->parent);
|
||||
if (IS_ERR(priv->regmap))
|
||||
return PTR_ERR(priv->regmap);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
/* max. channels number is 2 when in QDEC mode */
|
||||
priv->num_channels = of_property_count_u32_elems(np, "reg");
|
||||
|
|
Загрузка…
Ссылка в новой задаче