I'd suggest keeping it in -mm for a while.
I worry about these kinds of "trivial" changes. Quite often, some errors
may be normal, and breaking out early can sometimes hurt more than it
helps, in that it just makes things not even limp along. That said, with
the disk/partition size check removed, this looks more palatable.
However, this is just ugly. The thing is not only apparently totally
untested, since it is missing a semicolon, it should also just read
err = add_partition(disk, part, start, length, ADDPART_FLAG_NONE);
mutex_unlock(&bdev->bd_mutex);
return err;
without any unnecessary conditionals (or ugly line-breaks, for that
matter).
Wouldn't this be better done as
if (err)
goto out_unlink_cleanup;
to match the rest of the error handling?
Linus
-