diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-07-02 10:00:40 +0200 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2019-08-05 18:40:27 -0400 |
commit | f5e1040196dbfe14c77ce3dfe3b7b08d2d961e88 (patch) | |
tree | e369877467e809e5557e7c2d9446b0612a8b37bb /drivers/pci/controller/pci-host-generic.c | |
parent | e5092255bb3967bcc473dc86492dbbd5f7714023 (diff) |
ima: always return negative code for error
integrity_kernel_read() returns the number of bytes read. If this is
a short read then this positive value is returned from
ima_calc_file_hash_atfm(). Currently this is only indirectly called from
ima_calc_file_hash() and this function only tests for the return value
being zero or nonzero and also doesn't forward the return value.
Nevertheless there's no point in returning a positive value as an error,
so translate a short read into -EINVAL.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'drivers/pci/controller/pci-host-generic.c')
0 files changed, 0 insertions, 0 deletions