Yeah.  If this were a brand new driver then returning -EINVAL would be a
good idea.

Smatch actually warns about this code as well if you turn on the
--spammy option.  But there are too many of these kinds of warnings and
even I can't check them all so the warning is basically useless.

In a few months I will have improved the Smatch code to know that the
source string is too large so this bug could have been avoided.

regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to