Jeff Garzik wrote:Pekka Enberg wrote:On 7/21/06, Rolf Eike Beer <eike-kernel@xxxxxxxxx> wrote:In general, yes. However, some maintainers don't like that, so I would- if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))sizeof(*handle)?
+ handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
+ if (!handle)
return NULL;
recommend to keep them as-is unless you get a clear ack from the
maintainer to change it.
I suggest:
- check if "sizeof(type)"->"sizeof(*ptr)" is correct
- if yes, change it
- do this for all kmalloc + kzalloc in a file you touched, or
better yet for all kmalloc + kzalloc in a driver or subsystem you
touched