diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:38:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:38:54 +0200 |
commit | 412a5feba414127a6c69452dfad454086867011f (patch) | |
tree | bf5934b41bff82f4ec69283d10fb1a799f42a641 /drivers/nvmem/core.c | |
parent | 5f0ac3a1dae17ec0af6b845376247d7cc948ea3d (diff) | |
parent | 519d81956ee277b4419c723adfb154603c2565ba (diff) |
Merge 5.15-rc6 into tty-next
We need the serial/tty fixes in here as well.
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 3d87fadaa160..8976da38b375 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -1383,7 +1383,8 @@ static void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell, void *buf) *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, |