We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42b7950 commit 0518f35Copy full SHA for 0518f35
drivers/media/dvb-frontends/ts2020.c
@@ -554,13 +554,19 @@ static int ts2020_probe(struct i2c_client *client,
554
const struct i2c_device_id *id)
555
{
556
struct ts2020_config *pdata = client->dev.platform_data;
557
- struct dvb_frontend *fe = pdata->fe;
+ struct dvb_frontend *fe;
558
struct ts2020_priv *dev;
559
int ret;
560
u8 u8tmp;
561
unsigned int utmp;
562
char *chip_str;
563
564
+ if (!pdata) {
565
+ dev_err(&client->dev, "platform data is mandatory\n");
566
+ return -EINVAL;
567
+ }
568
+
569
+ fe = pdata->fe;
570
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
571
if (!dev) {
572
ret = -ENOMEM;
0 commit comments