diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-07-08 14:28:45 +0800 |
|---|---|---|
| committer | Heiko Stuebner <heiko@sntech.de> | 2026-10-13 13:50:09 +0200 |
| commit | 4ac852419f0d317c7bd8db5b8acb3cc78be7fe33 (patch) | |
| tree | ba8d0766f9a3cfb4fc05a8790098b97f5911f9e6 /scripts/basic/split-include.c | |
| parent | 8240e19d329e9e1502fc96608d8afe6861e9df90 (diff) | |
| download | linux-4ac852419f0d317c7bd8db5b8acb3cc78be7fe33.tar.gz linux-4ac852419f0d317c7bd8db5b8acb3cc78be7fe33.zip | |
accel/rocket: clear rdev on device init failure
rocket_probe() stores the return value from rocket_device_init() in the
file-scoped rdev pointer before checking whether it is an error pointer.
If rocket_device_init() fails, rdev is left as an ERR_PTR.
The rdev pointer is also used as the marker for whether the shared rocket
device has already been initialized. A later core probe can therefore see
a non-NULL rdev, skip rocket_device_init(), and dereference the error
pointer when reading rdev->num_cores.
Save the error code and clear rdev before returning from the
rocket_device_init() failure path.
Fixes: ed98261b4168 ("accel/rocket: Add a new driver for Rockchip's NPU")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Reviewed-by: Igor Paunovic <royalnet026@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260708062845.716487-1-lgs201920130244@gmail.com
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
