summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fman/src/wrapper
diff options
context:
space:
mode:
authorMandy Lavi <mandy.lavi@freescale.com>2015-01-19 12:37:45 (GMT)
committerHonghua Yin <Hong-Hua.Yin@freescale.com>2015-03-20 05:00:59 (GMT)
commit7bfbba1e607190bf542f56e87ff1ebc6d82388b5 (patch)
tree51ce5fc697a615e2cd6f8e4ec18b12e0ba54b231 /drivers/net/ethernet/freescale/fman/src/wrapper
parenteb985cb9b5e02d470870617b41fa51a1d9360c7f (diff)
downloadlinux-fsl-qoriq-7bfbba1e607190bf542f56e87ff1ebc6d82388b5.tar.xz
fmd: fix reading fm_port_ipv4_opt to not panic
Change-Id: Id4166dad03d6e51202caa367de188ff8486fa9dc Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28750 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Igal Liberman <Igal.Liberman@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/src/wrapper')
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm_port.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm_port.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm_port.c
index ae4bb87..0cdf6a8 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm_port.c
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm_port.c
@@ -692,6 +692,11 @@ static ssize_t show_fm_port_ipv4_options(struct device *dev,
if (!p_LnxWrpFmPortDev->h_Dev) {
n = snprintf(buf, PAGE_SIZE, "\tFM Port not configured...\n");
return n;
+ } else if (((t_FmPort *)p_LnxWrpFmPortDev->h_Dev)->p_ParamsPage
+ == NULL) {
+ n = snprintf(buf, PAGE_SIZE,
+ "\tPort: FMan-controller params page not set\n");
+ return n;
} else {
n = snprintf(buf, PAGE_SIZE,
"Counter for fragmented pkt with IP header options\n");