| To: | "Maciej W. Rozycki" <macro@linux-mips.org> |
|---|---|
| Subject: | Re: [PATCH] drivers/video/pmagb-b-fb.c: Improve diagnostics |
| From: | Mariusz Kozlowski <m.kozlowski@tuxland.pl> |
| Date: | Mon, 17 Sep 2007 20:30:08 +0200 |
| Cc: | Andrew Morton <akpm@linux-foundation.org>, Antonino Daplas <adaplas@pol.net>, linux-fbdev-devel@lists.sourceforge.net, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org |
| In-reply-to: | <Pine.LNX.4.64N.0709171746030.17606@blysk.ds.pg.gda.pl> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <Pine.LNX.4.64N.0709171746030.17606@blysk.ds.pg.gda.pl> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | KMail/1.9.7 |
Hello,
> Add error messages to the probe call.
You added them but probably forgot to return them ;)
> While they may rarely trigger, they may be useful when something weird is
> going on. Also this is good style.
[snip]
> patch-mips-2.6.18-20060920-pmagb-b-err-1
> diff -up --recursive --new-file
> linux-mips-2.6.18-20060920.macro/drivers/video/pmagb-b-fb.c
> linux-mips-2.6.18-20060920/drivers/video/pmagb-b-fb.c
> --- linux-mips-2.6.18-20060920.macro/drivers/video/pmagb-b-fb.c
> 2006-12-16 16:44:41.000000000 +0000
> +++ linux-mips-2.6.18-20060920/drivers/video/pmagb-b-fb.c 2006-12-16
> 16:44:52.000000000 +0000
> @@ -254,16 +254,23 @@ static int __init pmagbbfb_probe(struct
> struct pmagbbfb_par *par;
> char freq0[12], freq1[12];
> u32 vid_base;
> + int err = 0;
[snip]
> - if (register_framebuffer(info) < 0)
> + err = register_framebuffer(info);
> + if (err < 0) {
> + printk(KERN_ERR "%s: Cannot register framebuffer\n",
> + dev->bus_id);
> goto err_smem_map;
> + }
>
> get_device(dev);
Sth like this is missing?
@@ -330,7 +350,7 @@ err_cmap:
err_alloc:
framebuffer_release(info);
- return -ENXIO;
+ return err;
}
No?
Regards,
Mariusz
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] lk201: Remove obsolete driver, Ralf Baechle |
|---|---|
| Next by Date: | busybox / ELDK fails to run., Paul Marciano |
| Previous by Thread: | [PATCH] drivers/video/pmagb-b-fb.c: Improve diagnostics, Maciej W. Rozycki |
| Next by Thread: | Re: [PATCH] drivers/video/pmagb-b-fb.c: Improve diagnostics, Maciej W. Rozycki |
| Indexes: | [Date] [Thread] [Top] [All Lists] |