Add request and release firmware to catch bugs where there is an imbalance between release and request firmware. request_firmware(const struct firmware **firmware_p, const char *name, struct device *device) release frees(firmware) so we should pass '0' to the table entry in the ALLOC. Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx> --- v1-->v2: Fix the return range for success path. check_unwind.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check_unwind.c b/check_unwind.c index 59678a94..83163cb7 100644 --- a/check_unwind.c +++ b/check_unwind.c @@ -95,6 +95,9 @@ static struct ref_func_info func_table[] = { { "ieee80211_alloc_hw", ALLOC, -1, "$", &valid_ptr_min_sval, &valid_ptr_max_sval }, { "ieee80211_free_hw", RELEASE, 0, "$" }, + + { "request_firmware", ALLOC, 0, "$", &int_zero, &int_zero }, + { "release_firmware", RELEASE, 0, "$" }, }; static struct smatch_state *unmatched_state(struct sm_state *sm) -- 2.39.3