[U-Boot] [PATCH v6 10/26] pmic:battery: Support for Trats Battery at PMIC framework

Anatolij Gustschin agust at denx.de
Sat Nov 10 01:11:55 CET 2012


Hi Lukasz,

On Fri, 09 Nov 2012 08:42:15 +0100
Lukasz Majewski <l.majewski at samsung.com> wrote:
...
> +int power_bat_init(unsigned char bus)
> +{
> +	struct pmic *p = pmic_alloc();
> +	static const char name[] = "BAT_TRATS";
> +
> +	debug("Board BAT init\n");
> +
> +	p->interface = PMIC_NONE;
> +	p->name = name;
> +	p->bus = bus;

Please check the return value of pmic_alloc() before accessing.

Thanks,
Anatolij


More information about the U-Boot mailing list