Re: [PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe()

2020-09-29 Thread Jing Xiangfeng
On 2020/9/16 5:44, Martin K. Petersen wrote: Jing, esas2r_probe() calls scsi_host_put() in an error path. However, esas2r_log_dev() may hit a potential NULL dereference. So use NUll instead. Wouldn't it be better to move the scsi_host_put() call after the error message? There is

Re: [PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe()

2020-09-16 Thread Jing Xiangfeng
On 2020/9/16 5:44, Martin K. Petersen wrote: Jing, esas2r_probe() calls scsi_host_put() in an error path. However, esas2r_log_dev() may hit a potential NULL dereference. So use NUll instead. Wouldn't it be better to move the scsi_host_put() call after the error message? There is

Re: [PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe()

2020-09-15 Thread Martin K. Petersen
Jing, > esas2r_probe() calls scsi_host_put() in an error path. However, > esas2r_log_dev() may hit a potential NULL dereference. So use NUll instead. Wouldn't it be better to move the scsi_host_put() call after the error message? -- Martin K. Petersen Oracle Linux Engineering

[PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe()

2020-09-09 Thread Jing Xiangfeng
esas2r_probe() calls scsi_host_put() in an error path. However, esas2r_log_dev() may hit a potential NULL dereference. So use NUll instead. Signed-off-by: Jing Xiangfeng --- drivers/scsi/esas2r/esas2r_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git