Re: [PATCH] usb: omap_udc: fix build warnings

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

 



On Sat, Dec 4, 2010 at 12:22 AM, Robert Pearce <rob@xxxxxxxxxxxxxxxxxxxx> wrote:
> Hi Anand,
>
> On Fri,  3 Dec 2010 23:13:51 +0530 you wrote:
>> Not sure if these are false positives, but it does shut the
>> compiler up.
>
> Surely that's not acceptable! If they aren't false positives, and the
> pointers really are "used uninitialized", then initializing them to
> NULL isn't actually any safer than what was there before. Just shutting
> the compiler up is only acceptable if you can also say "and I've
> confirmed that this is a safe way to fix it".
>
>
> (Sorry, I deal with safety related software at work and things done "to
> shut the compiler up" or "so that Lint doesn't complain" are a common
> source of bugs.)

Point taken.

I've now gone through the code in a little more detail. These variables are
never used before being assigned to with a clk_get. There is then
a check for IS_ERR(dc_clk) or IS_ERR(hhc_clk) before these variables
are actually used anywhere in this function.

However looking at the code makes me think there is some more cleanup
that can be done in this function. I'll do that and resubmit.

Please ignore this patch.

- Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux