Re: [PATCH] drivers/video/pmagb-b-fb.c: Improve diagnostics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux