aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/genhd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/block/genhd.c b/block/genhd.c
index c114a43052de..0be95135c404 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -236,7 +236,7 @@ static int printk_partition(struct device *dev, void *data)
236 int n; 236 int n;
237 237
238 if (dev->type != &disk_type) 238 if (dev->type != &disk_type)
239 goto exit; 239 return 0;
240 240
241 sgp = dev_to_disk(dev); 241 sgp = dev_to_disk(dev);
242 /* 242 /*
@@ -244,7 +244,7 @@ static int printk_partition(struct device *dev, void *data)
244 */ 244 */
245 if (get_capacity(sgp) == 0 || 245 if (get_capacity(sgp) == 0 ||
246 (sgp->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)) 246 (sgp->flags & GENHD_FL_SUPPRESS_PARTITION_INFO))
247 goto exit; 247 return 0;
248 248
249 /* 249 /*
250 * Note, unlike /proc/partitions, I am showing the numbers in 250 * Note, unlike /proc/partitions, I am showing the numbers in
@@ -264,15 +264,15 @@ static int printk_partition(struct device *dev, void *data)
264 /* now show the partitions */ 264 /* now show the partitions */
265 for (n = 0; n < sgp->minors - 1; ++n) { 265 for (n = 0; n < sgp->minors - 1; ++n) {
266 if (sgp->part[n] == NULL) 266 if (sgp->part[n] == NULL)
267 goto exit; 267 continue;
268 if (sgp->part[n]->nr_sects == 0) 268 if (sgp->part[n]->nr_sects == 0)
269 goto exit; 269 continue;
270 printk(" %02x%02x %10llu %s\n", 270 printk(" %02x%02x %10llu %s\n",
271 sgp->major, n + 1 + sgp->first_minor, 271 sgp->major, n + 1 + sgp->first_minor,
272 (unsigned long long)sgp->part[n]->nr_sects >> 1, 272 (unsigned long long)sgp->part[n]->nr_sects >> 1,
273 disk_name(sgp, n + 1, buf)); 273 disk_name(sgp, n + 1, buf));
274 } 274 }
275exit: 275
276 return 0; 276 return 0;
277} 277}
278 278