diff options
author | Julia Lawall <julia@diku.dk> | 2010-03-11 17:09:55 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 10:23:32 -0400 |
commit | 4644efabde172808c0a8b6e3f17e4c204a4e52e7 (patch) | |
tree | bda7fdf7b3d26a738f12f9f15bd423fce82c5f69 /drivers/scsi/bfa/bfad_im.c | |
parent | f3d6e1dcd291fd0da3accb0d60fbd0d26d2189ed (diff) |
[SCSI] bfa: eliminate useless code
The variable bfa_itnim is initialized twice to the same (side effect-free)
expression. Drop one initialization.
A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)
// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@
x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jing Huang <huangj@brocade.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfad_im.c')
-rw-r--r-- | drivers/scsi/bfa/bfad_im.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 78f42aa57369..e2c70de2dba5 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c | |||
@@ -252,7 +252,6 @@ bfad_im_target_reset_send(struct bfad_s *bfad, struct scsi_cmnd *cmnd, | |||
252 | struct bfa_itnim_s *bfa_itnim; | 252 | struct bfa_itnim_s *bfa_itnim; |
253 | bfa_status_t rc = BFA_STATUS_OK; | 253 | bfa_status_t rc = BFA_STATUS_OK; |
254 | 254 | ||
255 | bfa_itnim = bfa_fcs_itnim_get_halitn(&itnim->fcs_itnim); | ||
256 | tskim = bfa_tskim_alloc(&bfad->bfa, (struct bfad_tskim_s *) cmnd); | 255 | tskim = bfa_tskim_alloc(&bfad->bfa, (struct bfad_tskim_s *) cmnd); |
257 | if (!tskim) { | 256 | if (!tskim) { |
258 | BFA_DEV_PRINTF(bfad, BFA_ERR, | 257 | BFA_DEV_PRINTF(bfad, BFA_ERR, |