diff options
author | Pan Bian <bianpan2016@163.com> | 2016-12-03 23:02:27 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-06 02:24:14 +0100 |
commit | 8f6040cebd2382a5cfb201419d40e7a4a193a412 (patch) | |
tree | 66bb6d61a0eae69f10ff0ce30bde5054957ef078 /fs/cifs/smbfsctl.h | |
parent | fb1013a01673acf7e94e38cda169828ac76b345a (diff) | |
download | blackbird-op-linux-8f6040cebd2382a5cfb201419d40e7a4a193a412.tar.gz blackbird-op-linux-8f6040cebd2382a5cfb201419d40e7a4a193a412.zip |
cpuidle: fix improper return value on error
In function cpuidle_add_state_sysfs(), variable ret takes the return
value. Its value should be negative on errors. Because ret is reset in
the loop, its value will be 0 during the second and after repeat of the
loop. If kzalloc() returns a NULL pointer then, it will return 0. It may
be better to explicitly assign "-ENOMEM" when the call to kzalloc()
fails.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=188901
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'fs/cifs/smbfsctl.h')
0 files changed, 0 insertions, 0 deletions