You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] RTC: handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
bfc7ee2070
commit
91046a8a69
+10
-2
@@ -562,11 +562,19 @@ static int x1205_probe(struct i2c_adapter *adapter, int address, int kind)
|
||||
else
|
||||
dev_err(&client->dev, "couldn't read status\n");
|
||||
|
||||
device_create_file(&client->dev, &dev_attr_atrim);
|
||||
device_create_file(&client->dev, &dev_attr_dtrim);
|
||||
err = device_create_file(&client->dev, &dev_attr_atrim);
|
||||
if (err) goto exit_devreg;
|
||||
err = device_create_file(&client->dev, &dev_attr_dtrim);
|
||||
if (err) goto exit_atrim;
|
||||
|
||||
return 0;
|
||||
|
||||
exit_atrim:
|
||||
device_remove_file(&client->dev, &dev_attr_atrim);
|
||||
|
||||
exit_devreg:
|
||||
rtc_device_unregister(rtc);
|
||||
|
||||
exit_detach:
|
||||
i2c_detach_client(client);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user