[U-Boot] universal_c210: fix compiler error and compiler warning
Wolfgang Denk
wd at denx.de
Mon Dec 10 10:06:42 CET 2012
Dear Minkyu Kang,
In message <50C58623.3090308 at samsung.com> you wrote:
...
> @@ -337,7 +341,7 @@ static void init_pmic_lcd(void)
> unsigned char val;
> int ret = 0;
>
> - struct pmic *p = get_pmic();
> + struct pmic *p = pmic_get("MAX8998_PMIC");
>
> if (pmic_probe(p))
> return;
> @@ -428,7 +432,7 @@ static void reset_lcd(void)
>
> static void lcd_power_on(void)
> {
> - struct pmic *p = get_pmic();
> + struct pmic *p = pmic_get("MAX8998_PMIC");
>
> if (pmic_probe(p))
> return;
This is unrelated to your patch - but what if pmic_get() returns NULL?
pmic_probe() will crashif you pass it a NULL pointer...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Digital computers are themselves more complex than most things people
build: They have very large numbers of states. This makes conceiving,
describing, and testing them hard. Software systems have orders-of-
magnitude more states than computers do. - Fred Brooks, Jr.
More information about the U-Boot
mailing list