aboutsummaryrefslogtreecommitdiffstats
path: root/vold
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-09-01 08:28:21 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-09-01 08:28:21 -0700
commit8c92ba1921fc8dc3fc7cc39ef854e9ee70fafc67 (patch)
treedb381770ca1f3244b0aedfd5633b0f6efcf2fab5 /vold
parentbdb9831ce9195c15ab6f2c01d809fb7946dd2f34 (diff)
parente86a2c7ceb767bce5c9a6706d7f36289d3e5de49 (diff)
downloadsystem_core-8c92ba1921fc8dc3fc7cc39ef854e9ee70fafc67.zip
system_core-8c92ba1921fc8dc3fc7cc39ef854e9ee70fafc67.tar.gz
system_core-8c92ba1921fc8dc3fc7cc39ef854e9ee70fafc67.tar.bz2
merge from open-source master
Diffstat (limited to 'vold')
-rw-r--r--vold/mmc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vold/mmc.c b/vold/mmc.c
index 22894a1..d90845d 100644
--- a/vold/mmc.c
+++ b/vold/mmc.c
@@ -158,6 +158,10 @@ static int mmc_bootstrap_card(char *sysfs_path)
sprintf(filename, "/sys%s/name", devpath);
p = read_file(filename, &sz);
+ if (!p) {
+ LOGE("Unable to read MMC name: %s", filename);
+ return -errno;
+ }
p[strlen(p) - 1] = '\0';
sprintf(tmp, "MMC_NAME=%s", p);
free(p);