Messages in this thread | | | From | Luiz Sampaio <> | Subject | [PATCH v2 0/2] Fixing bug that would segmentation fault | Date | Tue, 9 Nov 2021 19:07:30 -0300 |
| |
This series of patches consists of one patch fixing a simple coding style issue and one patch fixing a bug that would cause segmentation fault. Basically, there was a pointer that was being dereferenced without testing if the pointer exists. This patch adds a protection, returning EFAULT in case the pointer is NULL.
Changes in v2: - Changed return to -EINVAL and using WARN_ON as suggested - Note in response for Miguel's comment: for the first patch, I ran the script './scripts/checkpatch.pl --file --terse' to see with the file had any coding style issue. That was when I was suggested to remove 'int' from 'unsigned long' declaration
Luiz Sampaio (2): auxdisplay: charlcd: fixing coding style issue auxdisplay: charlcd: checking for pointer reference before dereferencing
drivers/auxdisplay/charlcd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
-- 2.33.1
| |