[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, andy-tracking, updated. upstream/20090303.gitb9de904e-140-g23b564c

Nelson Castillo arhuaco at freaks-unidos.net
Mon Jun 8 17:30:11 UTC 2009


The following commit has been merged in the andy-tracking branch:
commit 4fc401c9b26be1765de71791e15e59093df94eac
Author: Nelson Castillo <arhuaco at freaks-unidos.net>
Date:   Thu May 14 23:46:41 2009 -0500

    Avoid null pointer access on early call to pcf50633_mbc_get_status
    
    Avoid a kernel panic during an early call
    to the pcf50633_mbc_get_status function.

diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c
index 8772604..1bdb990 100644
--- a/drivers/power/pcf50633-charger.c
+++ b/drivers/power/pcf50633-charger.c
@@ -114,6 +114,9 @@ int pcf50633_mbc_get_status(struct pcf50633 *pcf)
 	struct pcf50633_mbc *mbc  = platform_get_drvdata(pcf->mbc_pdev);
 	int status = 0;
 
+	if (!mbc)
+		return 0;
+
 	if (mbc->usb_online)
 		status |= PCF50633_MBC_USB_ONLINE;
 	if (mbc->usb_active)

-- 
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko



More information about the pkg-fso-commits mailing list