All of lore.kernel.org
 help / color / mirror / Atom feed
* fsl/fman: Clarification for implementation details in dtsec_config()
@ 2016-01-13 21:20 ` SF Markus Elfring
  0 siblings, 0 replies; 12+ messages in thread
From: SF Markus Elfring @ 2016-01-13 21:20 UTC (permalink / raw)
  To: netdev, Andrew Lunn, Dan Carpenter, David S. Miller,
	Igal Liberman
  Cc: linux-kernel, kernel-janitors, Julia Lawall

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åa03bfd873c29eb786655ef2e95e53ed242b404#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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-01-14 21:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-13 21:20 fsl/fman: Clarification for implementation details in dtsec_config() SF Markus Elfring
2016-01-13 21:20 ` SF Markus Elfring
2016-01-13 21:35 ` Dan Carpenter
2016-01-13 21:35   ` Dan Carpenter
2016-01-13 22:09   ` Andrew Lunn
2016-01-13 22:09     ` Andrew Lunn
2016-01-14 15:00     ` [PATCH] fsl/fman: Delete one function call "put_device" " SF Markus Elfring
2016-01-14 15:00       ` SF Markus Elfring
2016-01-14 16:27       ` Andrew Lunn
2016-01-14 16:27         ` Andrew Lunn
2016-01-14 21:51       ` David Miller
2016-01-14 21:51         ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.