|
@@ -33,7 +33,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
+ /* check for a valid ubi magic */
|
|
|
+ err = mtd_read(mtd, 0, 4, &len, (void *) magic);
|
|
|
+ if (!err && len == 4 && strncmp(magic, "UBI#", 4)) {
|
|
|
-+ pr_err("UBI error: no valid UBI magic found inside mtd%d", mtd->index);
|
|
|
++ pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
|
|
|
+ put_mtd_device(mtd);
|
|
|
+ return;
|
|
|
+ }
|
|
@@ -48,7 +48,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
+ err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0);
|
|
|
+ mutex_unlock(&ubi_devices_mutex);
|
|
|
+ if (err < 0) {
|
|
|
-+ pr_err("UBI error: cannot attach mtd%d", mtd->index);
|
|
|
++ pr_err("UBI error: cannot attach mtd%d\n", mtd->index);
|
|
|
+ put_mtd_device(mtd);
|
|
|
+ }
|
|
|
+ }
|