From: Dan Carpenter Date: Wed, 6 Nov 2013 08:24:02 +0000 (+0100) Subject: pktcdvd: debugfs functions return NULL on error X-Git-Tag: v3.13-rc1~100^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49c2856af779bb1a36fa598804e4c0b2251fae57;p=pandora-kernel.git pktcdvd: debugfs functions return NULL on error My static checker complains correctly that this is potential NULL dereference because debugfs functions return NULL on error. They return an ERR_PTR if they are configured out. We don't need to check for ERR_PTR because if debugfs is stubbed out the dummy functions won't complain about that. We don't need to check the values before calling debugfs_remove() because that accepts ERR_PTRs and NULL pointers. We don't need to set pkt->dfs_f_info to NULL in pkt_debugfs_dev_new() because it was initialized with kzalloc() so I have removed that. Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed