diff for duplicates of <539C5E4A.3080005@kernel.org> diff --git a/a/1.txt b/N1/1.txt index 301d010..2608ae0 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -46,11 +46,11 @@ Me neither - which makes that tested by rather handy ;) >> @@ -528,15 +527,16 @@ static u8 at91_adc_get_trigger_value_by_name(struct iio_dev *idev, >> return -ENOMEM; >> ->> if (strcmp(trigger_name, name) = 0) { +>> if (strcmp(trigger_name, name) == 0) { >> - value = triggers[i].value; >> kfree(name); >> - break; ->> + if (triggers[i].value = 0) +>> + if (triggers[i].value == 0) >> + return -EINVAL; >> + return triggers[i].value; >> } @@ -74,7 +74,7 @@ Me neither - which makes that tested by rather handy ;) >> value = at91_adc_get_trigger_value_by_name(idev, >> st->trigger_list, >> idev->trig->name); ->> - if (value = 0) +>> - if (value == 0) >> - return -EINVAL; >> + if (value < 0) >> + return value; diff --git a/a/content_digest b/N1/content_digest index 57f059f..890e2c6 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,7 +3,7 @@ "ref\020140611144141.GH3429@piout.net\0" "From\0Jonathan Cameron <jic23@kernel.org>\0" "Subject\0Re: [patch v2] iio: adc: at91: signedness bug in at91_adc_get_trigger_value_by_name()\0" - "Date\0Sat, 14 Jun 2014 14:38:02 +0000\0" + "Date\0Sat, 14 Jun 2014 15:38:02 +0100\0" "To\0Alexandre Belloni <alexandre.belloni@free-electrons.com>" " Dan Carpenter <dan.carpenter@oracle.com>\0" "Cc\0Grant Likely <grant.likely@linaro.org>" @@ -67,11 +67,11 @@ ">> @@ -528,15 +527,16 @@ static u8 at91_adc_get_trigger_value_by_name(struct iio_dev *idev,\n" ">> \t\t\treturn -ENOMEM;\n" ">>\n" - ">> \t\tif (strcmp(trigger_name, name) = 0) {\n" + ">> \t\tif (strcmp(trigger_name, name) == 0) {\n" ">> -\t\t\tvalue = triggers[i].value;\n" ">> \t\t\tkfree(name);\n" ">> -\t\t\tbreak;\n" - ">> +\t\t\tif (triggers[i].value = 0)\n" + ">> +\t\t\tif (triggers[i].value == 0)\n" ">> +\t\t\t\treturn -EINVAL;\n" ">> +\t\t\treturn triggers[i].value;\n" ">> \t\t}\n" @@ -95,7 +95,7 @@ ">> \tvalue = at91_adc_get_trigger_value_by_name(idev,\n" ">> \t\t\t\t\t\t st->trigger_list,\n" ">> \t\t\t\t\t\t idev->trig->name);\n" - ">> -\tif (value = 0)\n" + ">> -\tif (value == 0)\n" ">> -\t\treturn -EINVAL;\n" ">> +\tif (value < 0)\n" ">> +\t\treturn value;\n" @@ -104,4 +104,4 @@ ">> \t\tst->buffer = kmalloc(idev->scan_bytes, GFP_KERNEL);\n" > -4f0acc9a3d12e2992a984d7289ab9f262ffa11935b2d0b575a74557ee24a1253 +43da7831f1d7c209a3f84ea83606aae6df8a0acd9eac721a2d5f76298aaddb00
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.