Re: [patch] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors

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

 




Dan Carpenter schrieb:
> On Fri, Jun 04, 2010 at 02:26:05PM +0200, walter harms wrote:
>> Doint to many things at once is bad. IMHO it is more readable to do so:
>>
>> +status = copy_to_user(buf, hdr, 2);
>> +if ( status  != 0) {
>>
>> Maybe the maintainer has different ideas but especialy lines like will gain.
>>
>> -if ((status = copy_from_user(fragbuf + 2, buf + fragpos, fraglen)) != 0)
>> +status = copy_from_user(fragbuf + 2, buf + fragpos, fraglen):
>> +if ( status  != 0) {
>>
>> just my 2 cents,
> 
> You're right of course as always and checkpatch warns about these as
> well.
> 
> I figured if it was in the original code, it was probably OK to leave it.
> But I now recognize this as pure laziness on my part and I appologize.  
> Twenty lashes for me and all that.  Fixed patch coming up.  ;)
> 
> regards,
> dan carpenter

I hope my guidance will ease your way to enlightenment.   ;)

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


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux