Commit 42ddfd68 authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds
Browse files

[PATCH] EISA: handle sysfs errors

Signed-off-by: default avatarJeff Garzik <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 5e59393e
......@@ -226,14 +226,26 @@ static int __init eisa_init_device (struct eisa_root_device *root,
static int __init eisa_register_device (struct eisa_device *edev)
if (device_register (&edev->dev))
return -1;
int rc = device_register (&edev->dev);
if (rc)
return rc;
device_create_file (&edev->dev, &dev_attr_signature);
device_create_file (&edev->dev, &dev_attr_enabled);
device_create_file (&edev->dev, &dev_attr_modalias);
rc = device_create_file (&edev->dev, &dev_attr_signature);
if (rc) goto err_devreg;
rc = device_create_file (&edev->dev, &dev_attr_enabled);
if (rc) goto err_sig;
rc = device_create_file (&edev->dev, &dev_attr_modalias);
if (rc) goto err_enab;
return 0;
device_remove_file (&edev->dev, &dev_attr_enabled);
device_remove_file (&edev->dev, &dev_attr_signature);
return rc;
static int __init eisa_request_resources (struct eisa_root_device *root,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment