]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix an error code in add_partition()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 23 May 2017 14:28:36 +0000 (17:28 +0300)
committerJens Axboe <axboe@fb.com>
Tue, 23 May 2017 14:41:59 +0000 (08:41 -0600)
commita6c2814db9031d1fe144b132316a9475cd0733fc
tree8091261d734c80016cdcaa86e07aee84d8c09556
parent46deb4cb21e5467c9a4dabf71a14311c706a31b4
block: fix an error code in add_partition()

We don't set an error code on this path.  It means that we return NULL
instead of an error pointer and the caller does a NULL dereference.

Fixes: 1c2de0cedfd2 ("block, partition: add partition_meta_info to hd_struct")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/partition-generic.c