fsl/fman: Clarification for implementation details in dtsec_config()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

The Coccinelle semantic patch "deref_null.cocci" pointed out a potential
problem in the implementation of the function "dtsec_config" (lines 1434-1439):
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/net/ethernet/freescale/fman/fman_dtsec.c?id=e5a03bfd873c29eb786655ef2e95e53ed242b404#n1434
…
	dtsec->tbiphy = of_phy_find_device(params->internal_phy_node);
	if (!dtsec->tbiphy) {
		pr_err("of_phy_find_device (TBI PHY) failed\n");
		put_device(&dtsec->tbiphy->mdio.dev);
		goto err_dtsec_drv_param;
	}
…

If the pointer "dtsec->tbiphy" is NULL, then it will especially matter
if the shown address computation will succeed.
Should the call of the function "put_device" be removed,
or was another argument intended?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux