Re: [PATCH v3 18/23] regulator: add s2dos05 regulator support

Krzysztof Kozlowski
2024-06-20T16:09:11Z

On 18/06/2024 15:59, Dzmitry Sankouski wrote:
> S2dos05 has 1 buck and 4 LDO regulators, used for powering
> panel/touchscreen.
>
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

> diff --git a/drivers/regulator/s2dos05-regulator.c b/drivers/regulator/s2dos05-regulator.c
> new file mode 100644
> index 000000000000..3c58a1bd2262
> --- /dev/null
> +++ b/drivers/regulator/s2dos05-regulator.c
> @@ -0,0 +1,362 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * s2dos05.c - Regulator driver for the Samsung s2dos05
> + *
> + * Copyright (C) 2016 Samsung Electronics

Not happy. You upstream old issues. :( Please drop all junk Samsung code.

> + * Copyright (C) 2023 Dzmitry Sankouski <dsankouski@gmail.com>
> + *
> + */

...

> +
> + return ret;
> +
> +err_data:
> + devm_kfree(dev, (void *)s2dos05);

Why?

> + kfree(s2dos05);

Please test this first. This is obviously wrong and having such trivial
issue makes me question what else is in this Samsung code.

Best regards,
Krzysztof