Commit cb85f2b8 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'ionic-minor-code-fixes'

Shannon Nelson says:

====================
ionic: minor code fixes

These are a couple of code fixes for the ionic driver.
====================

Link: https://patch.msgid.link/20241212213157.12212-1-shannon.nelson@amd.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 663ad748 b096d62b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -277,7 +277,10 @@ void ionic_dev_teardown(struct ionic *ionic)
	idev->phy_cmb_pages = 0;
	idev->cmb_npages = 0;

	if (ionic->wq) {
		destroy_workqueue(ionic->wq);
		ionic->wq = NULL;
	}
	mutex_destroy(&idev->cmb_inuse_lock);
}

+2 −2
Original line number Diff line number Diff line
@@ -961,8 +961,8 @@ static int ionic_get_module_eeprom(struct net_device *netdev,
	len = min_t(u32, sizeof(xcvr->sprom), ee->len);

	do {
		memcpy(data, xcvr->sprom, len);
		memcpy(tbuf, xcvr->sprom, len);
		memcpy(data, &xcvr->sprom[ee->offset], len);
		memcpy(tbuf, &xcvr->sprom[ee->offset], len);

		/* Let's make sure we got a consistent copy */
		if (!memcmp(data, tbuf, len))
+2 −2
Original line number Diff line number Diff line
@@ -3869,8 +3869,8 @@ int ionic_lif_register(struct ionic_lif *lif)
	/* only register LIF0 for now */
	err = register_netdev(lif->netdev);
	if (err) {
		dev_err(lif->ionic->dev, "Cannot register net device, aborting\n");
		ionic_lif_unregister_phc(lif);
		dev_err(lif->ionic->dev, "Cannot register net device: %d, aborting\n", err);
		ionic_lif_unregister(lif);
		return err;
	}