| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for SiliconFile SR030PC30 VGA (1/10-Inch) Image Sensor with ISP |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * Based on mt9v011 Micron Digital Image Sensor driver |
|---|
| 11 | 12 | * Copyright (c) 2009 Mauro Carvalho Chehab |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 14 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 15 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 16 | | - * (at your option) any later version. |
|---|
| 17 | 13 | */ |
|---|
| 18 | 14 | |
|---|
| 19 | 15 | #include <linux/i2c.h> |
|---|
| .. | .. |
|---|
| 569 | 565 | if (!ret) |
|---|
| 570 | 566 | ret = sr030pc30_pwr_ctrl(sd, false, false); |
|---|
| 571 | 567 | |
|---|
| 572 | | - if (!ret && !info->pdata) |
|---|
| 568 | + if (ret) |
|---|
| 573 | 569 | return ret; |
|---|
| 574 | 570 | |
|---|
| 575 | 571 | expmin = EXPOS_MIN_MS * info->pdata->clk_rate / (8 * 1000); |
|---|
| .. | .. |
|---|
| 703 | 699 | return -ENOMEM; |
|---|
| 704 | 700 | |
|---|
| 705 | 701 | sd = &info->sd; |
|---|
| 706 | | - strcpy(sd->name, MODULE_NAME); |
|---|
| 707 | 702 | info->pdata = client->dev.platform_data; |
|---|
| 708 | 703 | |
|---|
| 709 | 704 | v4l2_i2c_subdev_init(sd, client, &sr030pc30_ops); |
|---|