lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200805290211.39355.s3c24xx@gmail.com>
Date:	Thu, 29 May 2008 02:11:38 +0800
From:	Qinghuang Feng <s3c24xx@...il.com>
To:	rmk@....linux.org.uk
Cc:	linux-arm-kernel@...ts.arm.linux.org.uk,
	linux-kernel@...r.kernel.org
Subject: [PATCH]scsi/arm: check the return value of device_create_file() in powertec.c

powertec.c : add code to print an error message while device_create_file() called from powertecscsi_probe() fail
 
Signed-off-by: Qinghuang Feng <s3c24xx@...il.com>
---
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c
index d9a546d..14e25a6 100644
--- a/drivers/scsi/arm/powertec.c
+++ b/drivers/scsi/arm/powertec.c
@@ -315,6 +315,7 @@ powertecscsi_probe(struct expansion_card
 	struct powertec_info *info;
 	void __iomem *base;
 	int ret;
+	int ferr;
 
 	ret = ecard_request_resources(ec);
 	if (ret)
@@ -361,7 +362,9 @@ powertecscsi_probe(struct expansion_card
 
 	ecard_setirq(ec, &powertecscsi_ops, info);
 
-	device_create_file(&ec->dev, &dev_attr_bus_term);
+	ferr = device_create_file(&ec->dev, &dev_attr_bus_term);
+	if (ferr)
+		printk(KERN_ERR "powertecscsi :failed to create the attribute file !\n");
 
 	ret = fas216_init(host);
 	if (ret)
@@ -398,7 +401,8 @@ powertecscsi_probe(struct expansion_card
 	fas216_release(host);
 
  out_free:
-	device_remove_file(&ec->dev, &dev_attr_bus_term);
+	if (!ferr)
+		device_remove_file(&ec->dev, &dev_attr_bus_term);
 	scsi_host_put(host);
 
  out_region:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ