summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_debugfs.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-01-31 14:19:00 +0200
committerFelipe Balbi <balbi@ti.com>2012-02-01 11:02:46 +0200
commit6c2abcdd4f8e21ce686a26697de0ce198a16eaed (patch)
tree5bbe1b04be09d81bc2188dd69f605101c06c9008 /drivers/usb/musb/musb_debugfs.c
parente9e8c85e69310141d78daaecd6a56138700ac317 (diff)
usb: musb: debugfs: fix error check
debugfs will return NULL on failure, so we must check for !ptr instead of IS_ERR(ptr). Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_debugfs.c')
-rw-r--r--drivers/usb/musb/musb_debugfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c
index 219d0fba584..40a37c91cc1 100644
--- a/drivers/usb/musb/musb_debugfs.c
+++ b/drivers/usb/musb/musb_debugfs.c
@@ -242,22 +242,22 @@ int __devinit musb_init_debugfs(struct musb *musb)
int ret;
root = debugfs_create_dir("musb", NULL);
- if (IS_ERR(root)) {
- ret = PTR_ERR(root);
+ if (!root) {
+ ret = -ENOMEM;
goto err0;
}
file = debugfs_create_file("regdump", S_IRUGO, root, musb,
&musb_regdump_fops);
- if (IS_ERR(file)) {
- ret = PTR_ERR(file);
+ if (!file) {
+ ret = -ENOMEM;
goto err1;
}
file = debugfs_create_file("testmode", S_IRUGO | S_IWUSR,
root, musb, &musb_test_mode_fops);
- if (IS_ERR(file)) {
- ret = PTR_ERR(file);
+ if (!file) {
+ ret = -ENOMEM;
goto err1;
}