From: Alexander Shiyan Date: Sat, 18 Jun 2016 14:45:15 +0000 (-0300) Subject: [media] media: coda: Fix probe() if reset controller is missing X-Git-Tag: v4.8-rc1~152^2~152 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=84345a23fa102100a13ff12f57d6aa09eb9359bc;p=linux.git [media] media: coda: Fix probe() if reset controller is missing Commit 39b4da71ca33 ("reset: use ENOTSUPP instead of ENOSYS") changed return value for reset controller if it missing. This patch changes the CODA driver to handle this value. Signed-off-by: Alexander Shiyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 3e9b7c817684..c39718a63e5e 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -2216,7 +2216,7 @@ static int coda_probe(struct platform_device *pdev) dev->rstc = devm_reset_control_get_optional(&pdev->dev, NULL); if (IS_ERR(dev->rstc)) { ret = PTR_ERR(dev->rstc); - if (ret == -ENOENT || ret == -ENOSYS) { + if (ret == -ENOENT || ret == -ENOTSUPP) { dev->rstc = NULL; } else { dev_err(&pdev->dev, "failed get reset control: %d\n",