Commit 16f557ec authored by Artem Bityutskiy's avatar Artem Bityutskiy
Browse files

UBI: fix comment

parent 593dd33c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -115,9 +115,8 @@ int ubi_change_vtbl_record(struct ubi_device *ubi, int idx,
}

/**
 * vol_til_check - check if volume table is not corrupted and contains sensible
 * vtbl_check - check if volume table is not corrupted and contains sensible
 *              data.
 *
 * @ubi: UBI device description object
 * @vtbl: volume table
 *
+3 −6
Original line number Diff line number Diff line
@@ -259,7 +259,6 @@ static int do_work(struct ubi_device *ubi)
	 */
	down_read(&ubi->work_sem);
	spin_lock(&ubi->wl_lock);

	if (list_empty(&ubi->works)) {
		spin_unlock(&ubi->wl_lock);
		up_read(&ubi->work_sem);
@@ -268,6 +267,8 @@ static int do_work(struct ubi_device *ubi)

	wrk = list_entry(ubi->works.next, struct ubi_work, list);
	list_del(&wrk->list);
	ubi->works_count -= 1;
	ubi_assert(ubi->works_count >= 0);
	spin_unlock(&ubi->wl_lock);

	/*
@@ -278,12 +279,8 @@ static int do_work(struct ubi_device *ubi)
	err = wrk->func(ubi, wrk, 0);
	if (err)
		ubi_err("work failed with error code %d", err);

	spin_lock(&ubi->wl_lock);
	ubi->works_count -= 1;
	ubi_assert(ubi->works_count >= 0);
	spin_unlock(&ubi->wl_lock);
	up_read(&ubi->work_sem);

	return err;
}