thermal: avoid division by zero in power allocator
authorAndrea Arcangeli <aarcange@redhat.com>
Thu, 1 Oct 2015 22:37:16 +0000 (15:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 2 Oct 2015 01:42:35 +0000 (21:42 -0400)
commit44241628bb207ec211bebd156aaf69470d90c209
tree2b0c143661cf3d9fbc66f5241854df85f0164a78
parentef510194cefe0cd369ef73419cd65b0a5bb4fb5b
thermal: avoid division by zero in power allocator

During boot I get a div by zero Oops regression starting in v4.3-rc3.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Javi Merino <javi.merino@arm.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/thermal/power_allocator.c