[media] atmel-isi: Fix bad usage of IS_ERR_VALUE
IS_ERR_VALUE() assumes that its parameter is an unsigned long. It can not be used to check if an unsigned int reflects an error. Doing so can result in the following build warning. drivers/media/platform/soc_camera/atmel-isi.c: In function "atmel_isi_probe": include/linux/err.h:21:38: warning: comparison is always false due to limited range of data type drivers/media/platform/soc_camera/atmel-isi.c:1089:6: note: in expansion of macro "IS_ERR_VALUE" If that warning is seen, the return value from platform_get_irq() is not checked for errors. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Родитель
1e77d55ac9
Коммит
0724745fae
|
@ -1026,7 +1026,7 @@ static int atmel_isi_parse_dt(struct atmel_isi *isi,
|
|||
|
||||
static int atmel_isi_probe(struct platform_device *pdev)
|
||||
{
|
||||
unsigned int irq;
|
||||
int irq;
|
||||
struct atmel_isi *isi;
|
||||
struct resource *regs;
|
||||
int ret, i;
|
||||
|
@ -1086,7 +1086,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
|
|||
isi->width_flags |= 1 << 9;
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (IS_ERR_VALUE(irq)) {
|
||||
if (irq < 0) {
|
||||
ret = irq;
|
||||
goto err_req_irq;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче