On Sat, 2008-02-09 at 04:13 -0800, Yinghai Lu wrote:
This one is a bit unnecessary; C promotion rules guarantee that
everything is promoted to int (or above) before doing arithmetic. Since
it's only ever done on 16 bits, signed or unsigned int is adequate for
the conversion.
Yes, I see that, thanks! There's also the kmalloc of scomp which should
be kzalloc if you care to fix that up in the resend.
Space cleanups also need mention in the changelog.
Neither of us gets this right. By removing the kfree(buf) from the
err_free path, you cause a leak here. I cause a double free. I think
putting back the kfree(buf) and keeping this hunk is the fix.
Yes, prevents double free (but only if buf is freed).
It's probably better to move these closer to the statements that make
them necessary (in this case above the comment).
kfree(scomp) should be in the err_free path just in case someone else
adds something to this.
What exactly is this supposed to be doing, and why 7? If you're
thinking of conditioning the page 7 receive on the success of the
allocation, we really need the allocation failure report more than we
need the driver to attach.
This is rather pointless, isn't it?
You can't remove this. Also add kfree(scomp) here.
Yes, a bug, thanks.
James
--