OSDN Git Service

usb-mtp: fix return status of delete
authorBandan Das <bsd@redhat.com>
Mon, 1 Apr 2019 21:17:10 +0000 (17:17 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 2 Apr 2019 05:22:40 +0000 (07:22 +0200)
commit4bc1591681cbeb4875f57fc99a4f821d032e4bd1
tree1ef80e128c9c594b99728e9983fbe13520f48c9e
parent5189e30b146ab39f9da8f35a23fc3c8e30b219c2
usb-mtp: fix return status of delete

Spotted by Coverity: CID 1399414

mtp delete allows the return status of delete succeeded,
partial_delete or readonly - when none of the objects could be
deleted. Give more meaningful names to return values of the
delete function.

Some initiators recurse over the objects themselves. In that case,
only READ_ONLY can be returned.

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-Id: <20190401211712.19012-2-bsd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-mtp.c