diff options
| author | Linkai Gong <gonglinkai@kylinos.cn> | 2026-08-03 09:54:50 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-10-13 16:30:21 +0200 |
| commit | fe26c195c265c033e474d015061a0183c7a02193 (patch) | |
| tree | aed6307e43aeef7ee7b4ec9e5ba3dce62080d9a0 /tools/lib/python/kdoc | |
| parent | eddbbe3ecb2236b214c2f1f732d2737d6bca567c (diff) | |
char: scx200_gpio: check cdev_add() return value
cdev_add() can fail. The driver currently ignores the return value and
reports probe success even when the cdev was not registered, leaving a
chrdev region allocated with no working file operations.
Check the return value, emit an error, and unwind the chrdev region and
platform device on failure.
Fixes: 635adb6cd25c ("[PATCH] scx200_gpio: use 1 cdev for N minors, not N for N")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
Link: https://patch.msgid.link/20260803015450.2050900-1-gonglinkai@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions
