Re: [QUESTION] staging/easycap fix

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

 



Hi Greg,

>
> It's only "recommended" if you have a compiler that doesn't check for
> such foolish things.
>

Understood. Thanks both.

Another question (hope you don't mind me asking so much):

I noticed easycap does lots of (redundant?) checks as:

pvideo_device = video_devdata(file);
if (!pvideo_device) {
  return -EFAULT;
}

Is this bad, good or doesn't matter?
(There are more examples where the check is clearly not needed but
this one makes me doubt a bit)

Maybe I'm focusing on small issues (as you already pointed out),
do you think this kind of patches would be accepted?

Of course, I would submit separate patches, one for each change:
1. split probe function
2. remove redundant checks
3. clean comment style
... and so on.

Also, I'm reading driver cx231xx as it's also an usb video capture.
Do you think it's a good code reference? Can you give me further reference?

I can think on nothing except reading driver code itself and
keep LDD3 and Love's book near.

Thanks,
Ezequiel.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux