ubi: pr_err() strings should end with newlines

The ubi_init() function has a few error paths that use the
pr_err() to output errors. These should have new lines on
them as pr_err() does not automatically do this.

This fixes issues where if multiple mtd fail to bind to
ubi the console output starts wrapping around.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>

authored by Ben Dooks and committed by Richard Weinberger 278f31a7 569dbb88

+6 -6
+6 -6
drivers/mtd/ubi/build.c
··· 1166 1166 BUILD_BUG_ON(sizeof(struct ubi_vid_hdr) != 64); 1167 1167 1168 1168 if (mtd_devs > UBI_MAX_DEVICES) { 1169 - pr_err("UBI error: too many MTD devices, maximum is %d", 1169 + pr_err("UBI error: too many MTD devices, maximum is %d\n", 1170 1170 UBI_MAX_DEVICES); 1171 1171 return -EINVAL; 1172 1172 } ··· 1178 1178 1179 1179 err = misc_register(&ubi_ctrl_cdev); 1180 1180 if (err) { 1181 - pr_err("UBI error: cannot register device"); 1181 + pr_err("UBI error: cannot register device\n"); 1182 1182 goto out; 1183 1183 } 1184 1184 ··· 1205 1205 mtd = open_mtd_device(p->name); 1206 1206 if (IS_ERR(mtd)) { 1207 1207 err = PTR_ERR(mtd); 1208 - pr_err("UBI error: cannot open mtd %s, error %d", 1208 + pr_err("UBI error: cannot open mtd %s, error %d\n", 1209 1209 p->name, err); 1210 1210 /* See comment below re-ubi_is_module(). */ 1211 1211 if (ubi_is_module()) ··· 1218 1218 p->vid_hdr_offs, p->max_beb_per1024); 1219 1219 mutex_unlock(&ubi_devices_mutex); 1220 1220 if (err < 0) { 1221 - pr_err("UBI error: cannot attach mtd%d", 1221 + pr_err("UBI error: cannot attach mtd%d\n", 1222 1222 mtd->index); 1223 1223 put_mtd_device(mtd); 1224 1224 ··· 1242 1242 1243 1243 err = ubiblock_init(); 1244 1244 if (err) { 1245 - pr_err("UBI error: block: cannot initialize, error %d", err); 1245 + pr_err("UBI error: block: cannot initialize, error %d\n", err); 1246 1246 1247 1247 /* See comment above re-ubi_is_module(). */ 1248 1248 if (ubi_is_module()) ··· 1265 1265 misc_deregister(&ubi_ctrl_cdev); 1266 1266 out: 1267 1267 class_unregister(&ubi_class); 1268 - pr_err("UBI error: cannot initialize UBI, error %d", err); 1268 + pr_err("UBI error: cannot initialize UBI, error %d\n", err); 1269 1269 return err; 1270 1270 } 1271 1271 late_initcall(ubi_init);