From: Crestez Dan Leonard Date: Tue, 3 May 2016 12:27:09 +0000 (+0300) Subject: iio: Fix error handling in iio_trigger_attach_poll_func X-Git-Tag: v3.2.82~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e1e5ca41ceb8b67714fd9fb3c8819f48e920112;p=pandora-kernel.git iio: Fix error handling in iio_trigger_attach_poll_func commit 99543823357966ac938d9a310947e731b67338e6 upstream. When attaching a pollfunc iio_trigger_attach_poll_func will allocate a virtual irq and call the driver's set_trigger_state function. Fix error handling to undo previous steps if any fails. In particular this fixes handling errors from a driver's set_trigger_state function. When using triggered buffers a failure to enable the trigger used to make the buffer unusable. Signed-off-by: Crestez Dan Leonard Signed-off-by: Jonathan Cameron [bwh: Backported to 3.2: adjust filename] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed