Skip to content
Commit ac2b0813 authored by Dan Carpenter's avatar Dan Carpenter Committed by Wolfram Sang
Browse files

i2c: amd-mp2-pci: Fix Oops in amd_mp2_pci_init() error handling



The problem is that we dereference "privdata->pci_dev" when we print
the error messages in amd_mp2_pci_init():

	dev_err(ndev_dev(privdata), "Failed to enable MP2 PCI device\n");
		^^^^^^^^^^^^^^^^^

Fixes: 529766e0 ("i2c: Add drivers for the AMD PCIe MP2 I2C controller")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
parent 8839e460
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment