RE: [scsi 1/2] scsi_debug: schedule_resp fix input variable check

2015-02-23 Thread Winkler, Tomas
> > @@ -3947,11 +3947,18 @@ schedule_resp(struct scsi_cmnd *cmnd, struct > sdebug_dev_info *devip, > > struct sdebug_queued_cmd *sqcp = NULL; > > struct scsi_device *sdp = cmnd->device; > > This patch seems incorrect because it still dereferences > cmnd (in the above line) before it checks

Re: [scsi 1/2] scsi_debug: schedule_resp fix input variable check

2015-02-23 Thread Douglas Gilbert
On 15-02-23 06:13 AM, Tomas Winkler wrote: The function should never be called with cmnd NULL so put a fat WARN there. Fix also smatch wraning: schedule_resp() warn: variable dereferenced before check 'cmnd' Signed-off-by: Tomas Winkler --- drivers/scsi/scsi_debug.c | 11 +-- 1 file

[scsi 1/2] scsi_debug: schedule_resp fix input variable check

2015-02-23 Thread Tomas Winkler
The function should never be called with cmnd NULL so put a fat WARN there. Fix also smatch wraning: schedule_resp() warn: variable dereferenced before check 'cmnd' Signed-off-by: Tomas Winkler --- drivers/scsi/scsi_debug.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff