diff options
author | Ben Dooks <[email protected]> | 2008-05-23 13:04:56 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2008-05-24 09:56:12 -0700 |
commit | d585dfe840c93ea800afc124333b6ac04722d359 (patch) | |
tree | 9e3824920e47db054f13dea3a13a029d4be926e5 | |
parent | 673b4600e3b3cc6689025e6a6fc6909b6e53dd5e (diff) |
S3C2410: add error print if we cannot add attribute
Fix the following warning by checking the result of device_create_file and
printing an error but not removing the device (loss of debug registers is
not fatal).
drivers/video/s3c2410fb.c:905: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result
Signed-off-by: Ben Dooks <[email protected]>
Cc: Arnaud Patard <[email protected]>
Acked-by: Krzysztof Helt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | drivers/video/s3c2410fb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 2219ae56a0e6..5fea847acd1c 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c @@ -972,7 +972,10 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev, } /* create device files */ - device_create_file(&pdev->dev, &dev_attr_debug); + ret = device_create_file(&pdev->dev, &dev_attr_debug); + if (ret) { + printk(KERN_ERR "failed to add debug attribute\n"); + } printk(KERN_INFO "fb%d: %s frame buffer device\n", fbinfo->node, fbinfo->fix.id); |