From: Himangi Saraogi Date: Mon, 14 Jul 2014 20:34:13 +0000 (+0530) Subject: Bluetooth: cmtp: Remove unnecessary null test X-Git-Tag: cleanup-for-v3.18~108^2~73^2~42^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d042654afb342386cb5c33e29843b76d598ab61;p=pandora-kernel.git Bluetooth: cmtp: Remove unnecessary null test This patch removes the null test on ctrl. ctrl is initialized at the beginning of the function to &session->ctrl. Since session is dereferenced prior to the null test, session must be a valid pointer, and &session->ctrl cannot be null. The following Coccinelle script is used for detecting the change: @r@ expression e,f; identifier g,y; statement S1,S2; @@ *e = &f->g <+... f->y ...+> *if (e != NULL || ...) S1 else S2 Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: Marcel Holtmann --- Reading git-diff-tree failed