Re: [PATCH v4 4/5] OMAP: mailbox: build device using omap_device/omap_hwmod

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

 



On Thu, Dec 16, 2010 at 2:44 AM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Thu, Dec 16, 2010 at 02:08:11PM +0530, Varadarajan, Charulatha wrote:
>> > +       oh = omap_hwmod_lookup("mailbox");
>> > +       if (!oh) {
>> > +               pr_err("%s: unable to find hwmod\n", __func__);
>> > +               return;
>> > +       }
>> > +
>> > +       od = omap_device_build("omap-mailbox", -1, oh,
>> > +                       NULL, 0,
>> > +                       mbox_latencies, ARRAY_SIZE(mbox_latencies),
>> > +                       0);
>> > +       if (!od) {
>>
>> Check for IS_ERR(od).
>>
>> > +               pr_err("%s: could not build device\n", __func__);
>
> If you have an API which returns errors, and you're bothering to print
> something when an error occurs, it's often useful to print the returned
> error code, so that people can find out _why_ the error occurred.
>

Agree.

Thanks,

Omar
--
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