camera_v2: JPEG 1.0: add alignment check on register offset

Adds a check on the offset value in msm_jpeg_hw_cmd structure
for correct alignment.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Change-Id: I9233cf6b7b300958188d2c95fb5a2c5f7a1e9cfb
diag: Safeguard for bound checks and integer underflow

At certain point in diag driver there can be integer underflow
and thus can lead to memory leak. Bound checks are placed to
ensure correct behavior of condition statements.

Change-Id: I47e02f764c2c7412db6f90fd42192fee32a761d3
CRs-fixed: 549470
Signed-off-by: Katish Paran <kparan@codeaurora.org>
msm: smd: change bounds check on smd edges

Off-by-one array bounds checking could result in out-of-bounds array
access.

Correct array bounds checking.

CRs-Fixed: 561670
Change-Id: Ie20396444686a8ce203c2296ba7235514279f35d
Signed-off-by: Brent Hronik <bhronik@codeaurora.org>
Merge "camera_v2: JPEG 1.0: add alignment check on register offset"
Merge "diag: Safeguard for bound checks and integer underflow"
Merge "msm: smd: change bounds check on smd edges"