Message ID | 167059958938.4906.8038603702843511422.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers | show |
Series | [thermal:,thermal/next] thermal/drivers/qcom/tsens: Init debugfs only with successful probe | expand |
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index b7d9782..3ac7804 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -939,8 +939,6 @@ int __init init_common(struct tsens_priv *priv) if (tsens_version(priv) >= VER_0_1) tsens_enable_irq(priv); - tsens_debug_init(op); - err_put_device: put_device(&op->dev); return ret; @@ -1182,7 +1180,11 @@ static int tsens_probe(struct platform_device *pdev) } } - return tsens_register(priv); + ret = tsens_register(priv); + if (!ret) + tsens_debug_init(pdev); + + return ret; } static int tsens_remove(struct platform_device *pdev)