X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fpnp%2Finterface.c;h=a0cfb75bbb8d72e82fbf74cfbd992ddce08f5245;hb=4721a4cc8864f0eb92958c3e0479e7994e8b0072;hp=b6beb8a36da70ffeba4288db5b9b8dcb6efb38bc;hpb=9dd78466c956ac4b4f38e12032dc4249ccf57ad1;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index b6beb8a..a0cfb75 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c @@ -3,7 +3,6 @@ * * Some code, especially possible resource dumping is based on isapnp_proc.c (c) Jaroslav Kysela * Copyright 2002 Adam Belay - * */ #include @@ -460,7 +459,8 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr, up(&pnp_res_mutex); goto done; } - done: + +done: if (retval < 0) return retval; return count; @@ -488,6 +488,7 @@ static DEVICE_ATTR(id, S_IRUGO, pnp_show_current_ids, NULL); int pnp_interface_attach_device(struct pnp_dev *dev) { int rc = device_create_file(&dev->dev, &dev_attr_options); + if (rc) goto err; rc = device_create_file(&dev->dev, &dev_attr_resources); @@ -499,10 +500,10 @@ int pnp_interface_attach_device(struct pnp_dev *dev) return 0; - err_res: +err_res: device_remove_file(&dev->dev, &dev_attr_resources); - err_opt: +err_opt: device_remove_file(&dev->dev, &dev_attr_options); - err: +err: return rc; }