Re: [PATCH 1/1] scsi: Initialize sdp after NULL check of cmnd

2015-06-17 Thread Johannes Thumshirn
On Wed, Jun 17, 2015 at 04:51:07PM +0530, Maninder Singh wrote: > Currently cmnd pointer is already dereferenced before NULL check > and thus getting below warning in static analysis: > warn: variable dereferenced before check 'cmnd' > > So initialize struct scsi_device *sdp after NULL check > of

[PATCH 1/1] scsi: Initialize sdp after NULL check of cmnd

2015-06-17 Thread Maninder Singh
Currently cmnd pointer is already dereferenced before NULL check and thus getting below warning in static analysis: warn: variable dereferenced before check 'cmnd' So initialize struct scsi_device *sdp after NULL check of cmnd Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- driv