summaryrefslogtreecommitdiffstats
path: root/block/partition-generic.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2017-06-28 19:34:15 +0200
committerJ. Bruce Fields <bfields@redhat.com>2017-06-28 19:34:15 +0200
commit9a1d168e1bc2893120bb7c0d9932dd22f97d0b55 (patch)
treef7d419f1601419aa0aebda102a6b14bdf7653443 /block/partition-generic.c
parentnfsd4: const-ify nfsd4_ops (diff)
parentLinux 4.12-rc5 (diff)
downloadlinux-9a1d168e1bc2893120bb7c0d9932dd22f97d0b55.tar.xz
linux-9a1d168e1bc2893120bb7c0d9932dd22f97d0b55.zip
Merge tag 'v4.12-rc5' into nfsd tree
Update to get f0c3192ceee3 "virtio_net: lower limit on buffer size". That bug was interfering with my nfsd testing.
Diffstat (limited to 'block/partition-generic.c')
-rw-r--r--block/partition-generic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/partition-generic.c b/block/partition-generic.c
index ff07b9143ca4..c5ec8246e25e 100644
--- a/block/partition-generic.c
+++ b/block/partition-generic.c
@@ -320,8 +320,10 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
if (info) {
struct partition_meta_info *pinfo = alloc_part_info(disk);
- if (!pinfo)
+ if (!pinfo) {
+ err = -ENOMEM;
goto out_free_stats;
+ }
memcpy(pinfo, info, sizeof(*info));
p->info = pinfo;
}