patch-2.4.7 linux/drivers/net/skfp/ess.c

Next file: linux/drivers/net/smc-ultra.c
Previous file: linux/drivers/net/sk_mca.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/drivers/net/skfp/ess.c linux/drivers/net/skfp/ess.c
@@ -258,8 +258,16 @@
 		 * Extract message parameters
 		 */
 		p = (void *) sm_to_para(smc,sm,SMT_P320F) ;
+                if (!p) {
+                        printk(KERN_ERR "ESS: sm_to_para failed");
+                        return fs;
+                }       
 		payload = ((struct smt_p_320f *)p)->mib_payload ;
 		p = (void *) sm_to_para(smc,sm,SMT_P3210) ;
+                if (!p) {
+                        printk(KERN_ERR "ESS: sm_to_para failed");
+                        return fs;
+                }       
 		overhead = ((struct smt_p_3210 *)p)->mib_overhead ;
 
 		DB_ESSN(2,"payload= %lx	overhead= %lx\n",payload,overhead) ;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)