diff mbox

i2c: ismt: add error return code in probe()

Message ID 1377250230-19166-1-git-send-email-wsa@the-dreams.de
State Accepted
Headers show

Commit Message

Wolfram Sang Aug. 23, 2013, 9:30 a.m. UTC
Return error code in the error case, and not success.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---

Error code itself is probably not perfect, but consistent :/ Improving the
return values might be considered for a later patch. Based on 3.11-rc6.

 drivers/i2c/busses/i2c-ismt.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Neil Horman Aug. 23, 2013, 12:42 p.m. UTC | #1
On Fri, Aug 23, 2013 at 11:30:14AM +0200, Wolfram Sang wrote:
> Return error code in the error case, and not success.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index cd82eb4..8ed79a0 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -879,6 +879,7 @@  ismt_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 						 DMA_BIT_MASK(32)) != 0)) {
 			dev_err(&pdev->dev, "pci_set_dma_mask fail %p\n",
 				pdev);
+			err = -ENODEV;
 			goto fail;
 		}
 	}