summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRongjun Chen <rongjun.chen@amlogic.com>2018-12-14 16:04:27 +0800
committerRongjun Chen <rongjun.chen@amlogic.com>2018-12-14 16:08:46 +0800
commit8accf4e6193840c2b9f0dd524f5c88c2e08b52c7 (patch)
tree32435f6f2a2e0bde872ae556f366a952ab219dc5
parentaa25c0d56cb754945088c8c65cbbc16041bc2091 (diff)
downloaddhd-driver-8accf4e6193840c2b9f0dd524f5c88c2e08b52c7.tar.gz
wifi: optimize fix r311 wifi panic issue [1/1]
PD#SWPL-3107 Problem: r311 autoreboot wifi panic Solution: fix the null pointer issue Verify: r311 Change-Id: I9f15fe6badb709448c53731fc97d74364a13bd03 Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
-rw-r--r--bcmdhd.1.579.77.41.1.cn/dbus.c2
-rw-r--r--bcmdhd.1.579.77.41.1.cn/dhd_linux.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/bcmdhd.1.579.77.41.1.cn/dbus.c b/bcmdhd.1.579.77.41.1.cn/dbus.c
index 1f040e7..7c77bbe 100644
--- a/bcmdhd.1.579.77.41.1.cn/dbus.c
+++ b/bcmdhd.1.579.77.41.1.cn/dbus.c
@@ -647,6 +647,8 @@ dbus_get_fw_nvram(dhd_bus_t *dhd_bus, char *pfw_path, char *pnv_path)
if (nv_image)
dhd_os_close_image(nv_image);
+ nv_image = NULL;
+
/* For Get first block of fw to calculate total_len */
file_exists = ((pfw_path != NULL) && (pfw_path[0] != '\0'));
if (file_exists) {
diff --git a/bcmdhd.1.579.77.41.1.cn/dhd_linux.c b/bcmdhd.1.579.77.41.1.cn/dhd_linux.c
index 9d769fe..0264224 100644
--- a/bcmdhd.1.579.77.41.1.cn/dhd_linux.c
+++ b/bcmdhd.1.579.77.41.1.cn/dhd_linux.c
@@ -13826,10 +13826,8 @@ err:
void
dhd_os_close_image(void *image)
{
- struct file *filp = image;
-
- if (filp && filp->f_op)
- filp_close(filp, NULL);
+ if (image)
+ filp_close((struct file *)image, NULL);
}
void