bluetooth: Refactor POLLHUP handling
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sun, 1 Jun 2014 11:55:02 +0000 (14:55 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Tue, 24 Jun 2014 10:29:39 +0000 (13:29 +0300)
commit15ae55ed9b89f997930e5bf7e7cde9c3d068190b
treed83eb18488febe7fd7324602e475ecb98d3381d6
parent59a8618dcd9128334f31bc5d68c24203f86d5b5e
bluetooth: Refactor POLLHUP handling

The code in the "io_fail" section was only used for HUP handling, but
there were jumps to there also from places where reading or writing
failed, because the read/write failure could have been caused by HUP.
This patch simplifies things by checking for HUP condition before
trying to read or write. Now if reading or writing fails, we will
jump to "fail" directly instead of going via the "io_fail" label. As
a result, the "io_fail" label isn't needed any more.
src/modules/bluetooth/module-bluez5-device.c