Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 814c5348 authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Further differentiate errors from select_pdo_store



Currently -EINVAL is returned both when a select_pdo string is
improperly formulated as well as when an RDO request is
successfully sent but outright rejected or otherwise failed
to enter a new contract. To allow userspace to differentiate
these two failures, instead return -ECONNREFUSED in the latter
case.

Change-Id: I74378b469745d0ef414f8cae228f79741d4846a5
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 7dd14669
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4020,7 +4020,7 @@ static ssize_t select_pdo_store(struct device *dev,
	if (pd->selected_pdo != pd->requested_pdo ||
			pd->current_voltage != pd->requested_voltage) {
		usbpd_err(&pd->dev, "select_pdo: request rejected\n");
		ret = -EINVAL;
		ret = -ECONNREFUSED;
	}

out: