diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:29:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:29:27 +0200 |
commit | 22d4f9beaf32a7cda9edeafdf5e99bec3de32c51 (patch) | |
tree | 37fd192452ba853e740d4b8c3fa0f171dc2b8d33 /drivers/nvmem/core.c | |
parent | d0221a780cbc99fec6c27a98dba2828dc5735c00 (diff) | |
parent | 519d81956ee277b4419c723adfb154603c2565ba (diff) | |
download | linux-22d4f9beaf32a7cda9edeafdf5e99bec3de32c51.tar.gz linux-22d4f9beaf32a7cda9edeafdf5e99bec3de32c51.tar.bz2 linux-22d4f9beaf32a7cda9edeafdf5e99bec3de32c51.zip |
Merge 5.15-rc6 into char-misc-next
We need the char/misc fixes in here for merging and testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/core.c')
-rw-r--r-- | drivers/nvmem/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index d7013c9b0fae..e765d3d0542e 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -1424,7 +1424,8 @@ static void nvmem_shift_read_buffer_in_place(struct nvmem_cell_entry *cell, void *p-- = 0; /* clear msb bits if any leftover in the last byte */ - *p &= GENMASK((cell->nbits%BITS_PER_BYTE) - 1, 0); + if (cell->nbits % BITS_PER_BYTE) + *p &= GENMASK((cell->nbits % BITS_PER_BYTE) - 1, 0); } static int __nvmem_cell_read(struct nvmem_device *nvmem, |