mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
qla2x00t: Avoid dereferencing a NULL pointer
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4843 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -4207,7 +4207,12 @@ int qla2xxx_tgt_register_driver(struct qla_tgt_data *tgt_data)
|
||||
|
||||
ENTER(__func__);
|
||||
|
||||
if ((tgt_data == NULL) || (tgt_data->magic != QLA2X_TARGET_MAGIC)) {
|
||||
if (tgt_data == NULL) {
|
||||
printk(KERN_ERR "***ERROR*** Wrong version of the target mode "
|
||||
"add-on: tgt_data == NULL\n");
|
||||
res = -EINVAL;
|
||||
goto out;
|
||||
} else if (tgt_data->magic != QLA2X_TARGET_MAGIC) {
|
||||
printk(KERN_ERR "***ERROR*** Wrong version of the target mode "
|
||||
"add-on: %d\n", tgt_data->magic);
|
||||
res = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user