--- kernel/init.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/kernel/init.c b/kernel/init.c index a151866..4e33e3a 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -1811,7 +1811,13 @@ int i; err("%s(%d) - num_devices = %i, reset to 127.", __FUNCTION__, __LINE__, num_devices); num_devices = 127; } - if (ret == 0 && (device_map = kmalloc(num_devices * sizeof(u_int32_t), GFP_KERNEL)) == NULL) + if (num_devices < 2 ) + { + err("%s(%d) - num_devices = %i, reset to 2.", __FUNCTION__, __LINE__, num_devices); + num_devices = 2; + } + + if (ret == 0 && (device_map = kmalloc(num_devices * sizeof(struct device_map), GFP_KERNEL)) == NULL) { ret = -ENOMEM; err("%s(%d) - ret = %d", __FUNCTION__, __LINE__, ret); @@ -1843,7 +1849,7 @@ int i; if (ret == 0) { blackberry_sha1_init(); - if( blackberry_sha1_avail() ) + if (blackberry_sha1_avail()) { info("%s(%d) - passwords are possible", __FUNCTION__, __LINE__); } -- 1.6.0.3 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Barry-devel mailing list Barry-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/barry-devel