Re: [PATCH 8/10] omap mailbox: OMAP4-Mailbox - Adds code changes to support OMAP4 mailbox.

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

 



On Tue, Sep 22, 2009 at 08:03:32PM +0530, C.A, Subramaniam wrote:
> @@ -70,10 +88,9 @@ static inline void mbox_write_reg(u32 val, size_t ofs)
>  static int omap2_mbox_startup(struct omap_mbox *mbox)
>  {
>  	unsigned int l;
> -
>  	mbox_ick_handle = clk_get(NULL, "mailboxes_ick");
>  	if (IS_ERR(mbox_ick_handle)) {
> -		printk("Could not get mailboxes_ick\n");
> +		printk(KERN_ERR "Could not get mailboxes_ick\n");
>  		return -ENODEV;

Good idea: Print the error code so people can diagnose why things fail.

		printk(KERN_ERR "Could not get mailboxes_ick: %d\n",
			PTR_ERR(mbox_ick_handle));

And wonder why this hasn't been spotted before.

Rule: always propagate error codes when you have one to propagate.

		return PTR_ERR(mbox_ick_handle);

BTW, in future, please post patches to my linux@ address, not my rmk@
address.  Patches to my rmk@ address tend to be heavily buried.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux