summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/apple-gmux.c
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2023-02-27 15:06:14 +0100
committerHans de Goede <hdegoede@redhat.com>2023-03-07 11:37:27 +0100
commit6a192c0cbf38a6ba10847590d680975086844dbb (patch)
tree3d959ea227aa4e60677d47e9cc087be3fccb2acb /drivers/platform/x86/apple-gmux.c
parentplatform/x86: ISST: Increase range of valid mail box commands (diff)
downloadlinux-6a192c0cbf38a6ba10847590d680975086844dbb.tar.xz
linux-6a192c0cbf38a6ba10847590d680975086844dbb.zip
platform/x86/intel/tpmi: Fix double free reported by Smatch
Fix warning: drivers/platform/x86/intel/tpmi.c:253 tpmi_create_device() warn: 'feature_vsec_dev' was already freed. If there is some error, feature_vsec_dev memory is freed as part of resource managed call intel_vsec_add_aux(). So, additional kfree() call is not required. Reordered res allocation and feature_vsec_dev, so that on error only res is freed. Reported-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/platform-driver-x86/Y%2FxYR7WGiPayZu%2FR@kili/T/#u Fixes: 47731fd2865f ("platform/x86/intel: Intel TPMI enumeration driver") Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20230227140614.2913474-1-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/apple-gmux.c')
0 files changed, 0 insertions, 0 deletions