diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-10-19 04:46:22 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-11-01 09:09:53 -0400 |
commit | e55fea0c50452449403bc8645fa3a6205dd74547 (patch) | |
tree | fa3ad7f91d4455fc152185a6aa10fb3061539ce4 /drivers/i2c/busses | |
parent | 5edb1062e54cffe84b0bfa9ffdfdad337e635d7d (diff) |
i2c: scmi: remove some bogus NULL checks
"obj" can't be NULL here.
We already know that "pkg->package.elements" gives us a valid pointer
so the next pointer after that is also non-NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-scmi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c index c447e8d40b78..599235514138 100644 --- a/drivers/i2c/busses/i2c-scmi.c +++ b/drivers/i2c/busses/i2c-scmi.c | |||
@@ -223,7 +223,7 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, | |||
223 | goto out; | 223 | goto out; |
224 | 224 | ||
225 | obj = pkg->package.elements + 1; | 225 | obj = pkg->package.elements + 1; |
226 | if (obj == NULL || obj->type != ACPI_TYPE_INTEGER) { | 226 | if (obj->type != ACPI_TYPE_INTEGER) { |
227 | ACPI_ERROR((AE_INFO, "Invalid argument type")); | 227 | ACPI_ERROR((AE_INFO, "Invalid argument type")); |
228 | result = -EIO; | 228 | result = -EIO; |
229 | goto out; | 229 | goto out; |
@@ -235,7 +235,7 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, | |||
235 | case I2C_SMBUS_BYTE: | 235 | case I2C_SMBUS_BYTE: |
236 | case I2C_SMBUS_BYTE_DATA: | 236 | case I2C_SMBUS_BYTE_DATA: |
237 | case I2C_SMBUS_WORD_DATA: | 237 | case I2C_SMBUS_WORD_DATA: |
238 | if (obj == NULL || obj->type != ACPI_TYPE_INTEGER) { | 238 | if (obj->type != ACPI_TYPE_INTEGER) { |
239 | ACPI_ERROR((AE_INFO, "Invalid argument type")); | 239 | ACPI_ERROR((AE_INFO, "Invalid argument type")); |
240 | result = -EIO; | 240 | result = -EIO; |
241 | goto out; | 241 | goto out; |
@@ -246,7 +246,7 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, | |||
246 | data->byte = obj->integer.value; | 246 | data->byte = obj->integer.value; |
247 | break; | 247 | break; |
248 | case I2C_SMBUS_BLOCK_DATA: | 248 | case I2C_SMBUS_BLOCK_DATA: |
249 | if (obj == NULL || obj->type != ACPI_TYPE_BUFFER) { | 249 | if (obj->type != ACPI_TYPE_BUFFER) { |
250 | ACPI_ERROR((AE_INFO, "Invalid argument type")); | 250 | ACPI_ERROR((AE_INFO, "Invalid argument type")); |
251 | result = -EIO; | 251 | result = -EIO; |
252 | goto out; | 252 | goto out; |