msm: camera: Fix improper ion free in error case

In case of ion import failure, error value is being passed as an
handle to ion_free which causes invalid address access. This patch
fixes improper api calls in error case.
Change-Id: Ibc85f12d92d876ffb18afe4d330a6c59f2b8bfcc
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
Priority of a merged request is computed by ioprio_best(). If one of the
requests has undefined priority (IOPRIO_CLASS_NONE) and another request
has priority from IOPRIO_CLASS_BE, the function will return the
undefined priority which is wrong. Fix the function to properly return
priority of a request with the defined priority.

Fixes: d58cdfb89ce0c6bd5f81ae931a984ef298dbda20
CC: stable@xxxxxxxxxxxxxxx
Signed-off-by: Jan Kara <jack@xxxxxxx>
diable /dev/diag
Revert "msm_serial_hs kernel config change"

This reverts commit f0db4550721f7bf083762b810a7b786bb71ef374.
Revert "msm_serial_hs: Handle client requests without port open"

This reverts commit cc69de24c8a754a655efc6460d76fad34147e92e.
Revert "msm_serial_hs: Handle Tx request while Clock OFF"

This reverts commit d9b3eae33d93ea1bee5963deb66f61d89a0a17a0.
Revert "msm_serial_hs: wait for clock-off to complete before shutdown"

This reverts commit 619c673a346d2e06fc7c26b78cc4af95b0bcbfa7.
Revert "msm_serial_hs: Avoid potential unclocked access by clients"

This reverts commit b11205ff2a428ca2781dd6b53c4c61913892a4b6.
Revert "msm_serial_hs: remove unused code"

This reverts commit 9724979804822777bce14c7a3c9dc9e907189e5e.
Revert "msm_serial_hs: Manage wake unlock delay"

This reverts commit 95ad5d11ccfe6094f9033b7d6fe1112f7900212f.
Revert "msm_serial_hs: Fix return value handling from platform_get_irq_by_name"

This reverts commit 5ee99dcf98a489702f57e57305ba6adbae99161a.
Revert "msm_serial_hs: Fix the logic for numbering the serial device"

This reverts commit 971b37f46e667dfac9a9c5597b1f771b42fa5d60.
Revert "msm_serial_hs: Programming BCR Register"

This reverts commit ab35cc02fa55c27b32c3ec88119047368b4bc91f.
Revert "msm_serial_hs: Remove code dependency on flag tty_flush_receive"

This reverts commit 63a7ca82c349a0f8779b65898ecc78c71a121969.
Revert "msm_serial_hs: fix unbalanced clock vote during port close"

This reverts commit 0c5d3deae1103e98012adf81b7f631756300df4d.
Revert "msm_serial_hs: Programing the TX FIFO watermark level to 4"

This reverts commit 6536f7adf7b537459ee4b94e017a0daf891c1fa8.
Revert "msm_serial_hs: Program RFR to synchronize clock-off sequence with HW"

This reverts commit c05f87d69d27e2aa8b6244a9abee009d9a2ccec2.
Revert "msm_serial_hs: Race Condition during Baud Rate Configuration"

This reverts commit 97b96f1fa19674d565d8cab6fecabb1808b138cd.
Revert "msm_serial_hs: Avoid RX getting stuck during rapid clock on/off"

This reverts commit 564a6f29b64191fdb121dd7b444b5d6a4b10adf9.
Revert "msm_serial_hs: Manage clock path-vote correctly"

This reverts commit 95ef70605ced87b55af427632a58231667435603.