From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 10 Dec 2012 10:06:42 +0100 Subject: [U-Boot] universal_c210: fix compiler error and compiler warning In-Reply-To: <50C58623.3090308@samsung.com> References: <50C58623.3090308@samsung.com> Message-ID: <20121210090642.5B787201212@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Minkyu Kang, In message <50C58623.3090308@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.