Don't panic if session is null in fc_sess_seq_alloc(), just return null.
PATCH 1/1 Don't panic if session is null in fc_sess_seq_alloc(), just return null.
Signed-off-by Rob Love <[email protected]>
---
drivers/scsi/ofc/libfc/fc_sess.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/scsi/ofc/libfc/fc_sess.c +2 -0
@@ -665,6 +665,8 @@ struct fc_seq *fc_sess_seq_alloc(struct fc_sess *sess,struct fc_exch *ep;struct fc_local_port *lp; +if (!sess) +return NULL ; lp = sess->fs_local_port; sp = fc_seq_start_exch(lp->fl_vf->vf_exch_mgr, recv, errh, arg, sess->fs_local_fid,