Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344443
b: refs/heads/master
c: 26cd4d6
h: refs/heads/master
i:
  344441: b553e23
  344439: 35ed4cd
v: v3
  • Loading branch information
Xiaotian Feng authored and Jeff Garzik committed Dec 14, 2012
1 parent fb330a2 commit 2d263db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39f80acb9fe5adff216bde33c554e4bf5f6eec12
refs/heads/master: 26cd4d65deba587f3cf2329b6869ce02bcbe68ec
6 changes: 4 additions & 2 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ ata_scsi_activity_show(struct device *dev, struct device_attribute *attr,
struct ata_port *ap = ata_shost_to_port(sdev->host);
struct ata_device *atadev = ata_scsi_find_dev(ap, sdev);

if (ap->ops->sw_activity_show && (ap->flags & ATA_FLAG_SW_ACTIVITY))
if (atadev && ap->ops->sw_activity_show &&
(ap->flags & ATA_FLAG_SW_ACTIVITY))
return ap->ops->sw_activity_show(atadev, buf);
return -EINVAL;
}
Expand All @@ -324,7 +325,8 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,
enum sw_activity val;
int rc;

if (ap->ops->sw_activity_store && (ap->flags & ATA_FLAG_SW_ACTIVITY)) {
if (atadev && ap->ops->sw_activity_store &&
(ap->flags & ATA_FLAG_SW_ACTIVITY)) {
val = simple_strtoul(buf, NULL, 0);
switch (val) {
case OFF: case BLINK_ON: case BLINK_OFF:
Expand Down

0 comments on commit 2d263db

Please sign in to comment.