scsi/gdth: fix crash in gdth_timeout if no gdth controllers found
If the gdth module is loaded (or compiled in), the gdth_timeout function gets started even if no actual gdth controllers are found b the probing. That ends up not only being unnecessary, but also causes a crash due to the function blindly just trying to pick the first entry off the "gdth_instances" list, and accessing it - which obviously doesn't work if the list is empty! Noticed by Ingo Molnar. Tested-by: NIngo Molnar <mingo@elte.hu> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Showing
想要评论请 注册 或 登录