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

Skip to content
Commit 26a11eb1 authored by Santosh Nayak's avatar Santosh Nayak Committed by Mauro Carvalho Chehab
Browse files

[media] dib0700: Return -EINTR and unlock mutex if locking attempts fails



In 'dib0700_i2c_xfer_new()' and 'dib0700_i2c_xfer_legacy()'
we are taking two locks:
                1. i2c_mutex
                2. usb_mutex
If attempt to take 'usb_mutex' lock fails then the previously taken
lock 'i2c_mutex' should be unlocked and -EINTR should be returned so
that caller can take appropriate action.

If locking attempt was interrupted by a signal then
we should return -EINTR. At present we are returning '0' for
such scenarios  which is wrong.

Replace -EAGAIN by -EINTR as a return type for the the scenario
where locking attempt was interrupted by signal.

Signed-off-by: default avatarSantosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b115f400
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment