Skip to content

Commit

Permalink
[SCSI] areca sysfs fix
Browse files Browse the repository at this point in the history
Remove sysfs_remove_bin_file() return-value checking from the areca driver.

There's nothing a driver can do if sysfs file removal fails, so we'll soon be
changing sysfs_remove_bin_file() to internally print a diagnostic and to
return void.

Cc: Erich Chen <erich@areca.com.tw>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Andrew Morton authored and James Bottomley committed Aug 2, 2006
1 parent 1c57e86 commit 43d6b68
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions drivers/scsi/arcmsr/arcmsr_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,36 +240,25 @@ int arcmsr_alloc_sysfs_attr(struct AdapterControlBlock *acb)
}
return 0;
error_bin_file_message_clear:
error = sysfs_remove_bin_file(&host->shost_classdev.kobj,
sysfs_remove_bin_file(&host->shost_classdev.kobj,
&arcmsr_sysfs_message_write_attr);
if (error)
printk(KERN_ERR "arcmsr: sysfs_remove_bin_file mu_write failed\n");
error_bin_file_message_write:
error = sysfs_remove_bin_file(&host->shost_classdev.kobj,
sysfs_remove_bin_file(&host->shost_classdev.kobj,
&arcmsr_sysfs_message_read_attr);
if (error)
printk(KERN_ERR "arcmsr: sysfs_remove_bin_file mu_read failed\n");
error_bin_file_message_read:
return error;
}

void
arcmsr_free_sysfs_attr(struct AdapterControlBlock *acb) {
struct Scsi_Host *host = acb->host;
int error;

error = sysfs_remove_bin_file(&host->shost_classdev.kobj,
sysfs_remove_bin_file(&host->shost_classdev.kobj,
&arcmsr_sysfs_message_clear_attr);
if (error)
printk(KERN_ERR "arcmsr: free sysfs mu_clear failed\n");
error = sysfs_remove_bin_file(&host->shost_classdev.kobj,
sysfs_remove_bin_file(&host->shost_classdev.kobj,
&arcmsr_sysfs_message_write_attr);
if (error)
printk(KERN_ERR "arcmsr: free sysfs mu_write failed\n");
error = sysfs_remove_bin_file(&host->shost_classdev.kobj,
sysfs_remove_bin_file(&host->shost_classdev.kobj,
&arcmsr_sysfs_message_read_attr);
if (error)
printk(KERN_ERR "arcmsr: free sysfss mu_read failed\n");
}


Expand Down

0 comments on commit 43d6b68

Please sign in to comment.