lib/decompress_unlz4.c: always set an error return code on failures

"ret", being set to -1 early on, gets cleared by the first invocation of
lz4_decompress()/lz4_decompress_unknownoutputsize(), and hence subsequent
failures wouldn't be noticed by the caller without setting it back to -1
right after those calls.

Reported-by: Matthew Daley <mattjd@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Kyungsik Lee <kyungsik.lee@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Revert "sched: Call the notify_on_migrate notifier chain for wakeups as well"

This reverts commit fc87cf03c3a4004d2f9ea1d4bdcdc2c38390eef3.
Revert "sched: window-based load stats for tasks"

This reverts commit c7b1bfafd3919e8b9de0c70c3676379d997d9ac6.
Revert "sched: Make scheduler aware of cpu frequency state"

This reverts commit 4d5b77e6f211b20ee4e0a1926521310543db931d.
Revert "cpufreq: cpu-boost: Handle wakeup hints received for foreground tasks"

This reverts commit 9cd93bc99b3fdbc7b34bac2b6e3c6f93d703cf03.
Revert "cpufreq: cpu-boost: Introduce scheduler assisted load based syncs"

This reverts commit 24d32ac5266363de85b8a7da5cbed8eb0052461b.
mako_hotplug: fix a bug where cores would get stuck online caused by a wrong if check during an input boost case.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
defconfig: enable lz4 compress and decompress.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ARM: Improve vmalloc address checking in show_data()

There is an unhandled corner case with the current check
which has recently been hit. The nbytes argument may be
large enough for the range being dumped to cross a
boundary between page-table mappings, and dump addresses
which are vmalloc'd in the neighboring mapping.

Check every address being dumped to see if its vmalloc'd,
not just the address passed to show_data().

CRs-Fixed: 625442
Change-Id: I255b093808177321f5202dcacea337ee333bfc63
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
dma-contiguous: Retrun 'zero' pfn in case of error

When CMA allocator gets error return from the page
allocator framework, except for the -EBUSY case, it
will bail out. Caller depends on the 'pfn' for
confirming allocation successful or not. Return 0
for those error case.

CRs-Fixed: 647635
Change-Id: Ica4e04a9f9f18b1a29035ba2bae9deecfd68a5e8
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mmc: core: Fix clock frequency transitions during invalid states

eMMC and SD card specifications restrict the usage of a class of
commands while commands in other class are in progress. For example,
during erase operations the SD/eMMC spec. allows only CMD35, CMD36,
CMD38. If clock scaling is enabled and decide to scale up the clocks
it may be possible that CMD19/21 tuning commands are sent in between
erase commands, which is illegal as per specification.

Fix such illegal transactions to the card and also make clock scaling
statistics accountable only for read/write commands instead of time
consuming commands, like CMD38 erase, where transactions are independent
of bus frequency.

Change-Id: Iffba175787837e7f95bde8970f19d0f0f9d7d67d
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
soc: qcom: smd: Validate read and write addresses

The address from which data has to be read and the address to which the
SMD data has to be written is calculated based on the head and tail
indices for that SMD FIFO. If the indices are corrupted, then the
calculated pointer may be outside of the FIFO and may even be outside of
the range of SMEM.

Validate the read and write addresses to be with in the limits of
receive and send FIFO limits respectively.

CRs-Fixed: 550527
Change-Id: Ie5578f6aee73ea2b1435fea7c2a0a6dda14bff82
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: camera: Fix improper memory free in failure case

Remove improper drv_priv free in failure case and
add NULL pointer check to avoid kernel panic

Change-Id: If074eba245e93bf8fead505993a2611582e4398d
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: camera: Fix long overflow on the pix clk

Using unsigned long to avoid overflow because
pix clk frequencies might cause long overflow.
Fix this by using unsigned long instead of long.

Change-Id: Iaf184de26d8ae689efa297096be9f01db84faded
Signed-off-by: Peter Liu <pingchie@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: camera: sensor: Update CCI WR comamnd buffer size to 11 bytes

I2C command length is of 11 bytes, it includes 10 bytes of data and
one byte of WR command. Use 11 bytes char array to create command.

Change-Id: Idf330fef6b8da79c6b7f5a2839d88a68e10a96f9
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: go back to pre 61acc402730fb09644334a4ab0509e70ae4f5eba version.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: go back to pre 61acc402730fb09644334a4ab0509e70ae4f5eba

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: remove problematic code.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: export cpu load.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: restructure CPUFREQ_GOV_LIMITS

The cpufreq_interactive_timer gets cancelled and rescheduled
whenever the cpufreq_policy is changed. When the cpufreq policy is
changed at a rate faster than the sampling_rate of the interactive
governor, then the governor misses to change the target frequency
for long duration. The patch removes the need of cancelling the
timers when policy->min is changed.

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: I7862f1c8022a3b98a890e7537f93d02010e86764
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>