diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-10-15 10:14:28 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-10-20 18:13:01 +0200 |
commit | 243e3cb9c093cab2e999e738304f1a23770b3717 (patch) | |
tree | 8a66a6fef0f34b754fb59678daccd3ea60479a19 /drivers/mfd/ti_am335x_tscadc.c | |
parent | mfd: ti_am335x_tscadc: Replace license text with SPDX tag (diff) | |
download | linux-243e3cb9c093cab2e999e738304f1a23770b3717.tar.xz linux-243e3cb9c093cab2e999e738304f1a23770b3717.zip |
mfd: ti_am335x_tscadc: Fix style
These are mostly deffects reported by checkpatch.pl.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20211015081506.933180-11-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mfd/ti_am335x_tscadc.c')
-rw-r--r-- | drivers/mfd/ti_am335x_tscadc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 82ace1cd6d2e..00428d12e6b8 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -141,7 +141,7 @@ static int ti_tscadc_probe(struct platform_device *pdev) adc_channels++; if (val > 7) { dev_err(&pdev->dev, " PIN numbers are 0..7 (not %d)\n", - val); + val); of_node_put(node); return -EINVAL; } @@ -154,6 +154,7 @@ static int ti_tscadc_probe(struct platform_device *pdev) dev_err(&pdev->dev, "Number of i/p channels more than 8\n"); return -EINVAL; } + if (total_channels == 0) { dev_err(&pdev->dev, "Need atleast one channel.\n"); return -EINVAL; @@ -184,7 +185,8 @@ static int ti_tscadc_probe(struct platform_device *pdev) tscadc->tscadc_phys_base = res->start; tscadc->regmap = devm_regmap_init_mmio(&pdev->dev, - tscadc->tscadc_base, &tscadc_regmap_config); + tscadc->tscadc_base, + &tscadc_regmap_config); if (IS_ERR(tscadc->regmap)) { dev_err(&pdev->dev, "regmap init failed\n"); err = PTR_ERR(tscadc->regmap); |