From: Johan Hedberg Date: Mon, 21 Jul 2014 07:50:06 +0000 (+0300) Subject: Bluetooth: Prefer sizeof(*ptr) when allocating memory X-Git-Tag: omap-for-v3.17/fixes-against-rc2~149^2~73^2~17^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27f70f3e628c82362def60eb0af79d2129a51da2;p=pandora-kernel.git Bluetooth: Prefer sizeof(*ptr) when allocating memory It's safer practice to use sizeof(*ptr) instead of sizeof(ptr_type) when allocating memory in case the type changes. This also fixes the following style of warnings from static analyzers: CHECK: Prefer kzalloc(sizeof(*ie)...) over kzalloc(sizeof(struct inquiry_entry)...) + ie = kzalloc(sizeof(struct inquiry_entry), GFP_KERNEL); Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann --- Reading git-diff-tree failed