mv643xx_eth: potential null dereference
[pandora-kernel.git] / drivers / net / mv643xx_eth.c
index 2fcdb1e..2d488ab 100644 (file)
@@ -2675,7 +2675,8 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
         * Detect hardware parameters.
         */
        msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
-       msp->tx_csum_limit = pd->tx_csum_limit ? pd->tx_csum_limit : 9 * 1024;
+       msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ?
+                                       pd->tx_csum_limit : 9 * 1024;
        infer_hw_params(msp);
 
        platform_set_drvdata(pdev, msp);