aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 00:03:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 00:03:53 -0400
commit158c12948f3012fbe15f066f308db23502d3db0a (patch)
tree7ff4843e1818ebf4a3d0877a3db8756327719fa2 /drivers/scsi
parent172bfe09dc52aef29f9c5c0bd9f77a558120faf4 (diff)
parent51a7097426f2243e192df4979c2bf197e6f2ce61 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree changes from Jiri Kosina: "Summer edition of trivial tree updates" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits) doc: fix two typos in watchdog-api.txt irq-gic: remove file name from heading comment MAINTAINERS: Add miscdevice.h to file list for char/misc drivers. scsi: mvsas: mv_sas.c: Fix for possible null pointer dereference doc: replace "practise" with "practice" in Documentation befs: remove check for CONFIG_BEFS_RW scsi: doc: fix 'SCSI_NCR_SETUP_MASTER_PARITY' drivers/usb/phy/phy.c: remove a leading space mfd: fix comment cpuidle: fix comment doc: hpfall.c: fix missing null-terminate after strncpy call usb: doc: hotplug.txt code typos kbuild: fix comment in Makefile.modinst SH: add proper prompt to SH_MAGIC_PANEL_R2_VERSION ARM: msm: Remove MSM_SCM crypto: Remove MPILIB_EXTRA doc: CN: remove dead link, kerneltrap.org no longer works media: update reference, kerneltrap.org no longer works hexagon: update reference, kerneltrap.org no longer works doc: LSM: update reference, kerneltrap.org no longer works ...
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/mvsas/mv_sas.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 6c1f223a8e1d..ac52f7c99513 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -1344,19 +1344,23 @@ void mvs_dev_gone_notify(struct domain_device *dev)
1344{ 1344{
1345 unsigned long flags = 0; 1345 unsigned long flags = 0;
1346 struct mvs_device *mvi_dev = dev->lldd_dev; 1346 struct mvs_device *mvi_dev = dev->lldd_dev;
1347 struct mvs_info *mvi = mvi_dev->mvi_info; 1347 struct mvs_info *mvi;
1348
1349 spin_lock_irqsave(&mvi->lock, flags);
1350 1348
1351 if (mvi_dev) { 1349 if (!mvi_dev) {
1352 mv_dprintk("found dev[%d:%x] is gone.\n",
1353 mvi_dev->device_id, mvi_dev->dev_type);
1354 mvs_release_task(mvi, dev);
1355 mvs_free_reg_set(mvi, mvi_dev);
1356 mvs_free_dev(mvi_dev);
1357 } else {
1358 mv_dprintk("found dev has gone.\n"); 1350 mv_dprintk("found dev has gone.\n");
1351 return;
1359 } 1352 }
1353
1354 mvi = mvi_dev->mvi_info;
1355
1356 spin_lock_irqsave(&mvi->lock, flags);
1357
1358 mv_dprintk("found dev[%d:%x] is gone.\n",
1359 mvi_dev->device_id, mvi_dev->dev_type);
1360 mvs_release_task(mvi, dev);
1361 mvs_free_reg_set(mvi, mvi_dev);
1362 mvs_free_dev(mvi_dev);
1363
1360 dev->lldd_dev = NULL; 1364 dev->lldd_dev = NULL;
1361 mvi_dev->sas_device = NULL; 1365 mvi_dev->sas_device = NULL;
1362 1366