Skip to content

Commit 234d72a

Browse files
committed
Merge tag 'staging-7.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH: "Here are two small staging driver fixes for 7.1-rc3. They are: - vme_user root device leak fix - NULL dereference bugfix in the rtl8723bs driver Both of these have been in linux-next all this week with no reported issues" * tag 'staging-7.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8723bs: os_dep: avoid NULL pointer dereference in rtw_cbuf_alloc staging: vme_user: fix root device leak on init failure
2 parents fe3e5bc + bc851db commit 234d72a

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/staging/rtl8723bs/os_dep/osdep_service.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ struct rtw_cbuf *rtw_cbuf_alloc(u32 size)
194194
struct rtw_cbuf *cbuf;
195195

196196
cbuf = kzalloc_flex(*cbuf, bufs, size);
197-
cbuf->size = size;
197+
if (cbuf)
198+
cbuf->size = size;
198199

199200
return cbuf;
200201
}

drivers/staging/vme_user/vme_fake.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,8 @@ static int __init fake_init(void)
12301230
err_driver:
12311231
kfree(fake_bridge);
12321232
err_struct:
1233+
root_device_unregister(vme_root);
1234+
12331235
return retval;
12341236
}
12351237

0 commit comments

Comments
 (0)