Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77343
b: refs/heads/master
c: 0f07a24
h: refs/heads/master
i:
  77341: ba9cd4c
  77339: 1ef1a47
  77335: 79beb71
  77327: dcfa3b9
  77311: 543be86
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Jan 27, 2008
1 parent 3183795 commit 9f012a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7a3670131c7662415fa799700fc0bdfe90a54b6
refs/heads/master: 0f07a24b4baf14859fde39b29bcc6fe279d18109
5 changes: 5 additions & 0 deletions trunk/drivers/i2c/busses/i2c-amd756.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
int error;
u8 temp;

/* driver_data might come from user-space, so check it */
if (id->driver_data > ARRAY_SIZE(chipname))
return -EINVAL;

if (amd756_ioport) {
dev_err(&pdev->dev, "Only one device supported "
"(you have a strange motherboard, btw)\n");
Expand Down Expand Up @@ -405,6 +409,7 @@ static struct pci_driver amd756_driver = {
.id_table = amd756_ids,
.probe = amd756_probe,
.remove = __devexit_p(amd756_remove),
.dynids.use_driver_data = 1,
};

static int __init amd756_init(void)
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/i2c/busses/i2c-viapro.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
unsigned char temp;
int error = -ENODEV;

/* driver_data might come from user-space, so check it */
if (id->driver_data & 1 || id->driver_data > 0xff)
return -EINVAL;

/* Determine the address of the SMBus areas */
if (force_addr) {
vt596_smba = force_addr & 0xfff0;
Expand Down Expand Up @@ -455,6 +459,7 @@ static struct pci_driver vt596_driver = {
.name = "vt596_smbus",
.id_table = vt596_ids,
.probe = vt596_probe,
.dynids.use_driver_data = 1,
};

static int __init i2c_vt596_init(void)
Expand Down

0 comments on commit 9f012a6

Please sign in to comment.